79% cf7geogle

Code Review | cf7geogle

WordPress plugin cf7geogle scored79%from 54 tests.

About plugin

  • Plugin page: cf7geogle
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.1-4.8.1
  • WordPress version: 6.3.1
  • First release: Nov 8, 2017
  • Latest release: Nov 13, 2017
  • Number of updates: 3
  • Update frequency: every 1.7 days
  • Top authors: jidaikobo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /601 total downloads

Benchmarks

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.06MB] [CPU: ▼2.65ms] Passed 4 tests

Server-side resources used by cf7geogle
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0636.77 ▼2.60
Dashboard /wp-admin3.37 ▲0.0744.49 ▼6.52
Posts /wp-admin/edit.php3.48 ▲0.1346.35 ▲0.42
Add New Post /wp-admin/post-new.php5.95 ▲0.0687.42 ▼1.90
Media Library /wp-admin/upload.php3.29 ▲0.0637.09 ▲0.89
CF7Geogle Config /wp-admin/options-general.php?page=cf7geogle3.2530.42

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
cf7geogle_option_google_api_key
widget_recent-posts
cf7geogle_option_is_include_api
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

cf7geogle: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.24 ▼1.061.69 ▼0.2341.16 ▼2.73
Dashboard /wp-admin2,210 ▲194.84 ▼1.04101.81 ▲1.2938.37 ▼6.17
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0040.19 ▲0.2435.55 ▼3.89
Add New Post /wp-admin/post-new.php1,537 ▼523.10 ▲4.89599.09 ▼12.7348.50 ▼6.44
Media Library /wp-admin/upload.php1,395 ▲104.21 ▲0.0997.28 ▼5.7543.29 ▲0.32
CF7Geogle Config /wp-admin/options-general.php?page=cf7geogle8472.0222.2928.31

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 8 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • cf7geogle_option_is_include_api
    • can_compress_scripts
    • cf7geogle_option_google_api_key
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=cf7geogle
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=cf7geogle
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/cf7geogle/views/admin/map.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/cf7geogle/views/admin/geocoding.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/cf7geogle/cf7geogle.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/cf7geogle/views/admin/option.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/cf7geogle/views/admin/addresssrc.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: google map, contact form 7

cf7geogle/cf7geogle.php Passed 13 tests

"cf7geogle" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
36 characters long description:
Google Map plugin for Contact Form 7

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected838 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP510794553
JavaScript5370223
PO File130362

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity41.00
▷ Minimum class complexity41.00
▷ Maximum class complexity41.00
Average method complexity4.08
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods1292.31%
▷ Protected methods17.69%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected