74% paid-pages-with-woocommerce

Code Review | Paid Pages with WooCommerce

WordPress plugin Paid Pages with WooCommerce scored 74% from 54 tests.

About plugin

  • Plugin page: paid-pages-with-w...
  • Plugin version: 0.2.4
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4.0
  • WordPress version: 6.3.1
  • First release: Jul 11, 2019
  • Latest release: Apr 24, 2020
  • Number of updates: 18
  • Update frequency: every 15.9 days
  • Top authors: xsid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 853 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼1.81MB] [CPU: ▼48.98ms] Passed 4 tests

This is a short check of server-side resources used by Paid Pages with WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1337.80 ▼5.95
Dashboard /wp-admin2.14 ▼1.177.60 ▼40.57
Posts /wp-admin/edit.php2.14 ▼1.2210.17 ▼38.35
Add New Post /wp-admin/post-new.php2.14 ▼3.757.48 ▼89.07
Media Library /wp-admin/upload.php2.14 ▼1.096.59 ▼27.93
All plans /wp-admin/edit.php?post_type=subscription_plan2.146.74
Add new /wp-admin/post-new.php?post_type=subscription_plan2.146.64

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Paid Pages with WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲11813.31 ▼0.931.63 ▼0.5141.02 ▼9.44
Dashboard /wp-admin2,256 ▲685.87 ▲0.9698.75 ▼9.2138.69 ▼3.33
Posts /wp-admin/edit.php2,143 ▲572.08 ▲0.0436.17 ▼1.0947.07 ▲14.58
Add New Post /wp-admin/post-new.php6,514 ▲4,98020.29 ▼2.87862.80 ▲181.4253.91 ▼6.79
Media Library /wp-admin/upload.php1,441 ▲564.23 ▲0.08102.13 ▼18.5243.93 ▼4.83
All plans /wp-admin/edit.php?post_type=subscription_plan1,1041.9532.7630.04
Add new /wp-admin/post-new.php?post_type=subscription_plan1,7593.5463.3994.12

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the ppww handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=subscription_plan
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the ppww handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: paid page access, subscriptions, woocommerce

paid-pages-with-woocommerce/ppww.php 85% from 13 tests

"Paid Pages with WooCommerce" version 0.2.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("paid-pages-with-woocommerce.php" instead of "ppww.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 plugin692 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP499108484
PO File15768150
CSS18052
SVG2006

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity22.00
▷ Minimum class complexity20.00
▷ Maximum class complexity24.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes4100.00%
Methods46
▷ Static methods817.39%
▷ Public methods46100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin