83% geo-phone-master

Code Review | Geo Phone Master

WordPress plugin Geo Phone Master scored83%from 54 tests.

About plugin

  • Plugin page: geo-phone-master
  • Plugin version: 0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.5.0
  • WordPress version: 6.3.1
  • First release: Jul 29, 2019
  • Latest release: Jan 7, 2021
  • Number of updates: 36
  • Update frequency: every 14.7 days
  • Top authors: nor1m (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /8,423 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▲412.28ms] 75% from 4 tests

Server-side resources used by Geo Phone Master
Please fix the following
  • Extra CPU: Extra CPU usage must be kept under 200.00ms (currently 412.28ms on /wp-admin/admin.php?page=ngp_geotargeting)
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.13815.58 ▲773.67
Dashboard /wp-admin3.43 ▲0.13428.98 ▲377.30
Posts /wp-admin/edit.php3.54 ▲0.19300.25 ▲248.27
Add New Post /wp-admin/post-new.php6.03 ▲0.14347.22 ▲249.87
Media Library /wp-admin/upload.php3.35 ▲0.12888.30 ▲850.69
Import-export /wp-admin/admin.php?page=ngp_import_export3.32284.65
Help /wp-admin/admin.php?page=ngp_help3.37283.75
Widget themes /wp-admin/admin.php?page=ngp_menu_themes3.35293.42
Multi-city /wp-admin/admin.php?page=ngp_multicity3.33285.41
Settings /wp-admin/admin.php?page=ngp_setting3.33293.61
Geo targeting /wp-admin/admin.php?page=ngp_geotargeting3.36302.82

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Geo Phone Master
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲6514.35 ▼0.302.46 ▼0.9640.15 ▼10.07
Dashboard /wp-admin2,235 ▲555.65 ▲0.0184.50 ▼4.4941.61 ▼0.94
Posts /wp-admin/edit.php2,143 ▲431.96 ▼0.0537.80 ▲1.2638.23 ▼0.93
Add New Post /wp-admin/post-new.php1,560 ▲3421.10 ▼2.03644.59 ▼15.9151.66 ▼3.71
Media Library /wp-admin/upload.php1,443 ▲464.08 ▼0.19101.79 ▼0.3843.40 ▼3.29
Import-export /wp-admin/admin.php?page=ngp_import_export8812.0425.7326.56
Help /wp-admin/admin.php?page=ngp_help1,2652.0223.5938.37
Widget themes /wp-admin/admin.php?page=ngp_menu_themes1,0432.1524.9629.63
Multi-city /wp-admin/admin.php?page=ngp_multicity8622.0525.3124.40
Settings /wp-admin/admin.php?page=ngp_setting9542.0324.4327.05
Geo targeting /wp-admin/admin.php?page=ngp_geotargeting8592.0526.7523.35

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'NGP_controller' not found in wp-content/plugins/geo-phone-master/nor1m-geo-phone-master-popup.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'NGP_controller' not found in wp-content/plugins/geo-phone-master/nor1m-geo-phone-master-themes.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'NGP_controller' not found in wp-content/plugins/geo-phone-master/nor1m-geo-phone-master-admin.php:4
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/geo-phone-master/nor1m-geo-phone-master.php on line 43
    • > PHP Fatal error
      Uncaught Error: Class 'NGP_controller' not found in wp-content/plugins/geo-phone-master/nor1m-geo-phone-master-import-export.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/geo-phone-master/nor1m-geo-phone-master-help.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'NGP_controller' not found in wp-content/plugins/geo-phone-master/nor1m-geo-phone-master-setting.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/geo-phone-master/nor1m-geo-phone-master.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (An example implementation), #2 (Multi-city), #3 (Geotargeting), #4 (Settings), #5 (Help), #6 (Theme), #7 (Import/Export)
Please take inspiration from this readme.txt

geo-phone-master/nor1m-geo-phone-master.php 92% from 13 tests

The main PHP script in "Geo Phone Master" version 0.7 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("geo-phone-master.php" instead of "nor1m-geo-phone-master.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin2,347 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP81841481,053
CSS11711802
PO File196106211
JavaScript12112175
Markdown1160106

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity21.67
▷ Minimum class complexity16.00
▷ Maximum class complexity31.00
Average method complexity5.13
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions1292.31%
▷ Anonymous functions17.69%
Constants22
▷ Global constants22100.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
7 PNG files occupy 0.42MB with 0.30MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png51.55KB18.55KB▼ 64.01%
screenshot-4.png51.85KB14.63KB▼ 71.78%
screenshot-2.png59.48KB17.13KB▼ 71.20%
screenshot-5.png59.04KB16.44KB▼ 72.15%
screenshot-1.png156.01KB38.74KB▼ 75.17%