84% wp-tao-one-time-offer

Code Review | WP Tao One Time Offer

WordPress plugin WP Tao One Time Offer scored84%from 54 tests.

About plugin

  • Plugin page: wp-tao-one-time-o...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.8
  • WordPress version: 6.3.1
  • First release: Jul 11, 2016
  • Latest release: Jun 19, 2017
  • Number of updates: 3
  • Update frequency: every 114.7 days
  • Top authors: upsell (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,669 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.08ms] Passed 4 tests

Analyzing server-side resources used by WP Tao One Time Offer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.76 ▼2.83
Dashboard /wp-admin3.33 ▼0.0150.22 ▼10.90
Posts /wp-admin/edit.php3.45 ▲0.0947.58 ▲1.84
Add New Post /wp-admin/post-new.php5.92 ▲0.03112.45 ▲14.27
Media Library /wp-admin/upload.php3.26 ▲0.0336.00 ▲3.56

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP Tao One Time Offer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6313.25 ▼1.051.72 ▼0.1044.04 ▲6.14
Dashboard /wp-admin2,215 ▲234.83 ▼0.12110.85 ▲6.8738.15 ▼6.37
Posts /wp-admin/edit.php2,100 ▲112.05 ▲0.0340.54 ▲4.9036.36 ▲0.84
Add New Post /wp-admin/post-new.php1,523 ▼1017.61 ▼5.73662.99 ▼3.0257.08 ▼5.93
Media Library /wp-admin/upload.php1,397 ▲94.23 ▲0.0698.47 ▼8.7141.36 ▼5.10

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

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)
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 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/wp-tao-one-time-offer/includes/admin/class-metabox.php:6

User-side errors Passed 1 test

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

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
8 plugin tags: one time, one time offer, wptao, expiration, wp tao...

wp-tao-one-time-offer/wp-tao-one-time-offer.php Passed 13 tests

The main PHP script in "WP Tao One Time Offer" version 1.0.1 is automatically included on every request by WordPress
51 characters long description:
The plugin givs you ability to set any page as OTO.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected180 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24841127
PO File19953

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity9.50
▷ Minimum class complexity9.00
▷ Maximum class complexity10.00
Average method complexity2.31
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods13
▷ Static methods17.69%
▷ Public methods861.54%
▷ Protected methods00.00%
▷ Private methods538.46%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin