83% spyrowebz-gmap

Code Review | Plugin Name: SWS Gmap

WordPress plugin Plugin Name: SWS Gmapscored 83% from 54 tests.

About plugin

  • Plugin page: spyrowebz-gmap
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Jun 13, 2014
  • Latest release: Sep 24, 2016
  • Number of updates: 26
  • Update frequency: every 32.1 days
  • Top authors: sultan_semmai@yahoo.com (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,243 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.01MB] [CPU: ▼1.15ms] Passed 4 tests

A check of server-side resources used by Plugin Name: SWS Gmap
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.71 ▼2.06
Dashboard /wp-admin3.31 ▲0.0145.88 ▼1.22
Posts /wp-admin/edit.php3.36 ▲0.0043.80 ▲0.72
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.93 ▲0.43
Media Library /wp-admin/upload.php3.23 ▲0.0033.95 ▼1.75

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Plugin Name: SWS Gmap
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,942 ▲20714.53 ▼0.1325.95 ▲24.1142.30 ▼1.97
Dashboard /wp-admin2,208 ▲194.88 ▼0.15107.83 ▼17.3242.73 ▼0.95
Posts /wp-admin/edit.php2,091 ▲52.01 ▼0.0441.11 ▲4.5336.41 ▲3.15
Add New Post /wp-admin/post-new.php1,530 ▼1223.43 ▲5.06618.22 ▼44.6550.53 ▼9.41
Media Library /wp-admin/upload.php1,387 ▼14.17 ▼0.03134.81 ▲37.2348.54 ▲1.88

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

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
Good news, no errors were detected

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
Please 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 register_activation_hook() in wp-content/plugins/spyrowebz-gmap/spyroweb_gmap.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% 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
These attributes need to be fixed:
  • Screenshots: These screenshots need descriptions #0, #0 in spyrowebz-gmap/assets to your readme.txt
  • Plugin Name: Please specify the plugin name on the first line ( === Plugin Name: SWS Gmap=== )
  • Contributors: The plugin contributors field is missing
The official readme.txt is a good inspiration

spyrowebz-gmap/spyroweb_gmap.php 92% from 13 tests

The primary PHP file in "Plugin Name: SWS Gmap" version 1.2 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("spyrowebz-gmap.php" instead of "spyroweb_gmap.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin55 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP18933
JavaScript23116
CSS1026

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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