84% cf7-jlocator

Code Review | ContactForm7jLocator

WordPress plugin ContactForm7jLocator scored84%from 54 tests.

About plugin

  • Plugin page: cf7-jlocator
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9
  • WordPress version: 6.3.1
  • First release: Sep 25, 2017
  • Latest release: Sep 25, 2017
  • Number of updates: 4
  • Update frequency: every 2.3 days
  • Top authors: Daschmi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /818 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.01ms] Passed 4 tests

This is a short check of server-side resources used by ContactForm7jLocator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0444.58 ▼5.45
Dashboard /wp-admin3.33 ▲0.0357.35 ▼0.35
Posts /wp-admin/edit.php3.38 ▲0.0353.40 ▲2.47
Add New Post /wp-admin/post-new.php5.91 ▲0.0389.78 ▼6.32
Media Library /wp-admin/upload.php3.26 ▲0.0339.28 ▲0.08
jLocator /wp-admin/options-general.php?page=cfjl3.2534.98

Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for ContactForm7jLocator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.38 ▼0.332.11 ▲0.4343.33 ▼2.62
Dashboard /wp-admin2,196 ▲255.51 ▼0.0798.95 ▼2.6142.06 ▼0.46
Posts /wp-admin/edit.php2,104 ▲41.94 ▼0.0435.68 ▼0.1434.53 ▲0.85
Add New Post /wp-admin/post-new.php1,531 ▲523.28 ▼0.47684.80 ▼15.6953.20 ▼2.34
Media Library /wp-admin/upload.php1,407 ▲44.11 ▼0.01105.75 ▼2.3245.75 ▼1.22
jLocator /wp-admin/options-general.php?page=cfjl8842.0025.5532.63

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-jlocator/jlocator.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: gps, form, contactform, contactform7, position...

cf7-jlocator/jlocator.php 85% from 13 tests

The main PHP script in "ContactForm7jLocator" version 1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("cf7-jlocator.php" instead of "jlocator.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected186 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
▷ Static methods787.50%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin