83% wppv-divi

Code Review | WP Pay Per View Divi

WordPress plugin WP Pay Per View Divi scored83%from 54 tests.

About plugin

  • Plugin page: wppv-divi
  • Plugin version: 1.0.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.1
  • WordPress version: 6.3.1
  • First release: Jul 8, 2021
  • Latest release: Dec 3, 2022
  • Number of updates: 7
  • Update frequency: every 73.3 days
  • Top authors: magicplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /731 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

A check of server-side resources used by WP Pay Per View Divi
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.75 ▼1.44
Dashboard /wp-admin3.31 ▲0.0044.16 ▼2.57
Posts /wp-admin/edit.php3.36 ▲0.0046.45 ▼0.25
Add New Post /wp-admin/post-new.php5.89 ▲0.0077.07 ▼19.96
Media Library /wp-admin/upload.php3.23 ▲0.0032.16 ▲0.60

Server storage [IO: ▲0.17MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Pay Per View Divi
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.35 ▼0.381.63 ▲0.0842.80 ▲3.71
Dashboard /wp-admin2,195 ▲155.63 ▼0.0488.38 ▼2.1737.87 ▼9.48
Posts /wp-admin/edit.php2,103 ▲62.00 ▲0.0640.56 ▲1.3935.44 ▼1.37
Add New Post /wp-admin/post-new.php1,533 ▲718.20 ▼4.87599.83 ▼58.0665.30 ▲8.05
Media Library /wp-admin/upload.php1,400 ▼04.22 ▲0.0892.69 ▲0.1440.62 ▼0.19

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please fix the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'DiviExtension' not found in wp-content/plugins/wppv-divi/includes/WpPayPerViewDivi.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/wppv-divi/includes/modules/WPPVVideo/WPPVVideo.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/wppv-divi/includes/modules/WPPVToolbar/WPPVToolbar.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function home_url() in wp-content/plugins/wppv-divi/wp-pay-per-view-divi.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4, #5 in wppv-divi/assets to your readme.txt
  • Contributors: Plugin contributors not specified
Please take inspiration from this readme.txt

wppv-divi/wp-pay-per-view-divi.php 92% from 13 tests

The primary PHP file in "WP Pay Per View Divi" version 1.0.10 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("wppv-divi.php" instead of "wp-pay-per-view-divi.php")

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
Everything looks great! No dangerous files found in this plugin224 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP545119218
CSS3003
JavaScript3113

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity2.33
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.31
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods13
▷ Static methods646.15%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin