83% geolocation-levels-for-paid-membership-pro

Code Review | Geolocation Levels for Paid Membership Pro

WordPress plugin Geolocation Levels for Paid Membership Pro scored83%from 54 tests.

About plugin

  • Plugin page: geolocation-level...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Jan 20, 2020
  • Latest release: Jan 20, 2020
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: qfnetwork (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /542 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼0.69ms] Passed 4 tests

A check of server-side resources used by Geolocation Levels for Paid Membership Pro
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.40 ▼4.76
Dashboard /wp-admin3.31 ▲0.0144.33 ▼0.05
Posts /wp-admin/edit.php3.36 ▲0.0146.12 ▼0.17
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.02 ▲2.50
Media Library /wp-admin/upload.php3.23 ▲0.0134.22 ▲2.21

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Geolocation Levels for Paid Membership Pro
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.37 ▼0.921.90 ▼0.1145.09 ▼4.69
Dashboard /wp-admin2,206 ▲215.90 ▲1.01105.15 ▼37.7141.45 ▼9.08
Posts /wp-admin/edit.php2,092 ▲31.97 ▼0.0938.16 ▼1.9938.43 ▲2.93
Add New Post /wp-admin/post-new.php1,543 ▲723.17 ▼0.03633.27 ▼21.9251.83 ▼1.34
Media Library /wp-admin/upload.php1,388 ▲34.20 ▼0.0696.24 ▼3.9941.74 ▲0.03

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

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)
Everything seems fine, however 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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/geolocation-levels-for-paid-membership-pro/includes/functions.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/geolocation-levels-for-paid-membership-pro/geolocation-levels-pmpro.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 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
Please fix the following attributes:
  • Requires php: Invalid version format
  • Screenshots: These screenshots require images: #1 (Screenshot 1), #2 (Screenshot 2)
The official readme.txt is a good inspiration

geolocation-levels-for-paid-membership-pro/geolocation-levels-pmpro.php 85% from 13 tests

"Geolocation Levels for Paid Membership Pro" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("geolocation-levels-for-paid-membership-pro.php" instead of "geolocation-levels-pmpro.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; 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 file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin1,665 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP121633581,361
SVG100288
CSS361113
JavaScript31173

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity16.29
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods47
▷ Static methods1327.66%
▷ Public methods1940.43%
▷ Protected methods00.00%
▷ Private methods2859.57%
Functions12
▷ Named functions1191.67%
▷ Anonymous functions18.33%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin