83% geo-my-wp-current-location-forms

Code Review | GEO my Wordpress - Current Location Forms

WordPress plugin GEO my Wordpress - Current Location Forms scored83%from 54 tests.

About plugin

  • Plugin page: geo-my-wp-current...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.9.1
  • WordPress version: 6.3.1
  • First release: Jun 8, 2014
  • Latest release: Jun 9, 2014
  • Number of updates: 5
  • Update frequency: every 1.0 days
  • Top authors: ninjew (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /3,586 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.22ms] Passed 4 tests

A check of server-side resources used by GEO my Wordpress - Current Location Forms
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.80 ▲1.38
Dashboard /wp-admin3.32 ▲0.0243.15 ▼5.77
Posts /wp-admin/edit.php3.37 ▲0.0244.62 ▼1.99
Add New Post /wp-admin/post-new.php5.90 ▲0.0289.99 ▲2.71
Media Library /wp-admin/upload.php3.24 ▲0.0133.44 ▼2.48

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for GEO my Wordpress - Current Location Forms
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.064.68 ▲2.7941.85 ▼4.67
Dashboard /wp-admin2,209 ▲215.87 ▲0.9895.22 ▼13.0938.73 ▼11.59
Posts /wp-admin/edit.php2,086 ▼32.05 ▲0.0438.63 ▲3.4135.84 ▲1.51
Add New Post /wp-admin/post-new.php1,537 ▲423.17 ▲0.22690.00 ▲12.6861.77 ▼7.09
Media Library /wp-admin/upload.php1,391 ▼04.18 ▼0.1095.15 ▼12.8142.38 ▼5.01

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/geo-my-wp-current-location-forms/forms/default/form.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (2.), #3 (4.)
  • Tags: There are too many tags (24 tag instead of maximum 10)
You can take inspiration from this readme.txt

geo-my-wp-current-location-forms/gmw-current-location-forms.php 77% from 13 tests

The principal PHP file in "GEO my Wordpress - Current Location Forms" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("geo-my-wp-current-location-forms.php" instead of "gmw-current-location-forms.php")
  • Domain Path: The domain path folder does not exist ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin235 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS1192154
PHP2404581

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.18MB with 0.12MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png21.53KB7.27KB▼ 66.25%
screenshot-4.png59.59KB19.73KB▼ 66.90%
screenshot-2.png19.85KB6.17KB▼ 68.93%
screenshot-3.png81.47KB27.15KB▼ 66.67%