87% pluginpass-pro-plugintheme-licensing

Code Review | PluginPass - WordPress PRO Plugin/Theme Licensing (Public Alpha)

WordPress plugin PluginPass - WordPress PRO Plugin/Theme Licensing (Public Alpha) scored 87% from 54 tests.

About plugin

  • Plugin page: pluginpass-pro-pl...
  • Plugin version: 0.9.10
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.7-5.2.2
  • WordPress version: 5.8.1
  • First release: Aug 9, 2019
  • Latest release: Sep 18, 2019
  • Number of updates: 24
  • Update frequency: every 1.7 days
  • Top authors: labs64 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 667 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.88MB] [CPU: ▼134.47ms] Passed 4 tests

Server-side resources used by PluginPass - WordPress PRO Plugin/Theme Licensing (Public Alpha)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.8938.34 ▲7.07
Dashboard /wp-admin3.95 ▲0.8950.93 ▲9.05
Posts /wp-admin/edit.php3.99 ▲0.8848.39 ▼3.21
Add New Post /wp-admin/post-new.php6.30 ▲0.8795.34 ▼541.77
Media Library /wp-admin/upload.php3.89 ▲0.8930.99 ▲0.02
PluginPass /wp-admin/options-general.php?page=pluginpass4.1733.72

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 221 new files
Database: 1 new table, no new options
New tables
wp_pluginpass_plugins

Browser metrics Passed 4 tests

This is an overview of browser requirements for PluginPass - WordPress PRO Plugin/Theme Licensing (Public Alpha)
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,830 ▲19316.27 ▲0.4013.66 ▲5.1445.18 ▼6.09
Dashboard /wp-admin2,991 ▲606.21 ▲0.32140.30 ▲2.05105.67 ▼4.67
Posts /wp-admin/edit.php2,754 ▲153.08 ▲0.3862.92 ▼5.9789.16 ▲4.41
Add New Post /wp-admin/post-new.php1,631 ▼4122.03 ▲3.15271.26 ▼90.45125.05 ▲11.24
Media Library /wp-admin/upload.php1,828 ▲215.35 ▲0.32127.21 ▼18.05116.18 ▼5.90
PluginPass /wp-admin/options-general.php?page=pluginpass1,3312.4958.5463.12

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% 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 everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 6× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/pluginpass-pro-plugintheme-licensing/vendor/php-curl-class/php-curl-class/www/index.php
    • > /wp-content/plugins/pluginpass-pro-plugintheme-licensing/inc/frontend/views/html-pluginpass-frontend-display.php
    • > /wp-content/plugins/pluginpass-pro-plugintheme-licensing/vendor/php-curl-class/php-curl-class/scripts/bump_minor_version.php
    • > /wp-content/plugins/pluginpass-pro-plugintheme-licensing/vendor/php-curl-class/php-curl-class/scripts/bump_patch_version.php
    • > /wp-content/plugins/pluginpass-pro-plugintheme-licensing/vendor/php-curl-class/php-curl-class/scripts/v4_migration.php
    • > /wp-content/plugins/pluginpass-pro-plugintheme-licensing/vendor/php-curl-class/php-curl-class/scripts/bump_major_version.php
  • 158× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      require(wp-content/plugins/pluginpass-pro-plugintheme-licensing/vendor/php-curl-class/php-curl-class/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/pluginpass-pro-plugintheme-licensing/vendor/php-curl-class/php-curl-class/examples/get_pages.php on line 2
    • > PHP Warning
      require(wp-content/plugins/pluginpass-pro-plugintheme-licensing/vendor/php-curl-class/php-curl-class/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/pluginpass-pro-plugintheme-licensing/vendor/php-curl-class/php-curl-class/examples/progress_advanced.php on line 2
    • > PHP Warning
      require(wp-content/plugins/pluginpass-pro-plugintheme-licensing/vendor/php-curl-class/php-curl-class/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/pluginpass-pro-plugintheme-licensing/vendor/php-curl-class/php-curl-class/examples/post_json.php on line 2
    • > PHP Warning
      require(wp-content/plugins/pluginpass-pro-plugintheme-licensing/vendor/php-curl-class/php-curl-class/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/pluginpass-pro-plugintheme-licensing/vendor/php-curl-class/php-curl-class/examples/head.php on line 2
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/pluginpass-pro-plugintheme-licensing/vendor/php-curl-class/php-curl-class/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/pluginpass-pro-plugintheme-licensing/vendor/php-curl-class/php-curl-class/examples/memory_leak_test_curl.php on line 2
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/pluginpass-pro-plugintheme-licensing/vendor/php-curl-class/php-curl-class/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/pluginpass-pro-plugintheme-licensing/vendor/php-curl-class/php-curl-class/examples/proxy.php on line 2
    • > PHP Warning
      require(wp-content/plugins/pluginpass-pro-plugintheme-licensing/vendor/php-curl-class/php-curl-class/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/pluginpass-pro-plugintheme-licensing/vendor/php-curl-class/php-curl-class/examples/progress.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'NetLicensing\\BaseEntity' not found in wp-content/plugins/pluginpass-pro-plugintheme-licensing/vendor/labs64/netlicensingclient-php/entity/Product.php:62
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/pluginpass-pro-plugintheme-licensing/vendor/php-curl-class/php-curl-class/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/pluginpass-pro-plugintheme-licensing/vendor/php-curl-class/php-curl-class/examples/download_file_with_callback.php on line 2
    • > PHP Fatal error
      Trait 'NetLicensing\\Properties' not found in wp-content/plugins/pluginpass-pro-plugintheme-licensing/vendor/labs64/netlicensingclient-php/entity/BaseEntity.php on line 16

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (PluginPass Overview), #2 (PluginPass Settings)
You can take inspiration from this readme.txt

pluginpass-pro-plugintheme-licensing/pluginpass.php 77% from 13 tests

The primary PHP file in "PluginPass - WordPress PRO Plugin/Theme Licensing (Public Alpha)" version 0.9.10 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 147 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("pluginpass-pro-plugintheme-licensing.php" instead of "pluginpass.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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 plugin15,947 lines of code in 199 files:
LanguageFilesBlank linesComment linesLines of code
PHP1642,7295,15014,000
XML4492702
Bourne Shell106760384
Markdown7860378
JSON400242
YAML37081
CSS2101063
Dockerfile2142149
JavaScript3115848

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity13.40
▷ Minimum class complexity1.00
▷ Maximum class complexity124.00
Average method complexity2.37
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces16
Interfaces0
Traits3
Classes72
▷ Abstract classes11.39%
▷ Concrete classes7198.61%
▷ Final classes00.00%
Methods668
▷ Static methods7310.93%
▷ Public methods58287.13%
▷ Protected methods517.63%
▷ Private methods355.24%
Functions268
▷ Named functions145.22%
▷ Anonymous functions25494.78%
Constants95
▷ Global constants99.47%
▷ Class constants8690.53%
▷ Public constants86100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.43MB with 0.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png43.82KB14.44KB▼ 67.05%
assets/banner-1544x500.png91.88KB30.27KB▼ 67.05%
assets/icon-256x256.png2.16KB1.47KB▼ 31.86%
assets/icon-128x128.png0.50KB0.24KB▼ 52.16%
screenshot-2.png206.23KB50.87KB▼ 75.33%