90% rcp-disable-subscription-upgrades

Code Review | Restrict Content Pro - Disable Subscription Upgrades

WordPress plugin Restrict Content Pro - Disable Subscription Upgrades scored90%from 54 tests.

About plugin

  • Plugin page: rcp-disable-subsc...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5
  • WordPress version: 6.3.1
  • First release: May 11, 2016
  • Latest release: May 11, 2016
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: ramiy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /859 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.87ms] Passed 4 tests

A check of server-side resources used by Restrict Content Pro - Disable Subscription Upgrades
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.06 ▲4.23
Dashboard /wp-admin3.31 ▲0.0051.70 ▲1.32
Posts /wp-admin/edit.php3.36 ▲0.0048.55 ▲1.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.40 ▼16.24
Media Library /wp-admin/upload.php3.24 ▲0.0037.36 ▲1.75

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Restrict Content Pro - Disable Subscription Upgrades
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.30 ▼0.082.08 ▼0.1942.78 ▲1.50
Dashboard /wp-admin2,195 ▲155.51 ▼0.1189.47 ▼0.7340.68 ▼5.10
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0737.67 ▼4.3734.65 ▼1.92
Add New Post /wp-admin/post-new.php1,526 ▼223.04 ▼0.16660.59 ▲12.8661.39 ▲4.01
Media Library /wp-admin/upload.php1,397 ▼64.19 ▼0.07112.64 ▲7.1048.96 ▲3.03

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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:
  • Screenshots: Add an image for screenshot #1 (RCP Action: Upgrade or change your subscription.)
You can take inspiration from this readme.txt

rcp-disable-subscription-upgrades/rcp-disable-subscription-upgrades.php Passed 13 tests

The main PHP file in "Restrict Content Pro - Disable Subscription Upgrades" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
71 characters long description:
Don't allow your users to upgrade their current RCP subscription level.

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
Everything looks great! No dangerous files found in this plugin6 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP26236

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.50
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%
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

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png32.76KB9.56KB▼ 70.80%