84% gf-limit-payments

Code Review | GF Limit Payments

WordPress plugin GF Limit Payments scored 84% from 54 tests.

About plugin

  • Plugin page: gf-limit-payments
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.0.0
  • WordPress version: 6.3.1
  • First release: Dec 18, 2018
  • Latest release: Feb 13, 2019
  • Number of updates: 3
  • Update frequency: every 19.7 days
  • Top authors: jamesdlow (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 655 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.22ms] Passed 4 tests

An overview of server-side resources used by GF Limit Payments
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.06 ▲2.01
Dashboard /wp-admin3.34 ▲0.0448.09 ▲4.03
Posts /wp-admin/edit.php3.39 ▲0.0443.19 ▼2.29
Add New Post /wp-admin/post-new.php5.92 ▲0.0490.18 ▲0.93
Media Library /wp-admin/upload.php3.26 ▲0.0433.75 ▼5.52

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for GF Limit Payments
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.21 ▼1.171.65 ▼0.0345.81 ▲3.69
Dashboard /wp-admin2,206 ▲214.86 ▼1.04111.37 ▲8.7443.10 ▲0.25
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0037.73 ▲3.1430.19 ▼4.60
Add New Post /wp-admin/post-new.php1,547 ▼13018.29 ▼6.36587.05 ▼44.9364.33 ▲8.97
Media Library /wp-admin/upload.php1,391 ▲34.15 ▼0.10102.59 ▲6.9343.28 ▼0.05

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gf-limit-payments/gf-limit-payments.php:24

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: recurring, paypal, queries, gforms, stripe...

gf-limit-payments/gf-limit-payments.php Passed 13 tests

The primary PHP file in "GF Limit Payments" version 1.0.2 is used by WordPress to initiate all plugin functionality
60 characters long description:
End subscription payments after a certain number of payments

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected149 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2821149

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity14.00
▷ Minimum class complexity7.00
▷ Maximum class complexity21.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods880.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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