84% woo-admin-licenses

Code Review | Woo Admin Licenses

WordPress plugin Woo Admin Licenses scored84%from 54 tests.

About plugin

  • Plugin page: woo-admin-licenses
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.9
  • WordPress version: 6.3.1
  • First release: Aug 14, 2017
  • Latest release: Nov 16, 2017
  • Number of updates: 33
  • Update frequency: every 2.9 days
  • Top authors: pwallner (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,053 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by Woo Admin Licenses
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.46 ▼0.61
Dashboard /wp-admin3.31 ▲0.0051.07 ▼2.11
Posts /wp-admin/edit.php3.36 ▲0.0046.95 ▲1.08
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.12 ▼7.80
Media Library /wp-admin/upload.php3.23 ▲0.0031.42 ▼6.53

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Woo Admin Licenses
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.13 ▼0.231.85 ▼0.4439.99 ▼4.50
Dashboard /wp-admin2,195 ▲275.56 ▼0.0187.14 ▼6.9139.61 ▼10.54
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0633.08 ▼3.5035.06 ▼3.99
Add New Post /wp-admin/post-new.php1,534 ▲718.34 ▼4.47635.99 ▼18.7176.52 ▲22.42
Media Library /wp-admin/upload.php1,400 ▼34.22 ▲0.0499.24 ▼2.4344.42 ▲0.57

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woo-admin-licenses/includes/class-wc-software-api.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Software_API_Request' not found in wp-content/plugins/woo-admin-licenses/includes/requests/class-wc-check-request.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/woo-admin-licenses/woo-admin-licenses.php:1599
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Software_API_Request' not found in wp-content/plugins/woo-admin-licenses/includes/requests/class-wc-generate-key-request.php:3
    • > PHP Warning
      Use of undefined constant WP_DEBUG - assumed 'WP_DEBUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-admin-licenses/includes/class-wc-software-api.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Software_API_Request' not found in wp-content/plugins/woo-admin-licenses/includes/requests/class-wc-deactivation-request.php:3

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: license, add-on, woocommerce, software, licence...

woo-admin-licenses/woo-admin-licenses.php 85% from 13 tests

The entry point to "Woo Admin Licenses" version 1.2.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 277 characters long)
  • Requires at least: Required version must match the one declared in readme.txt ("4.7" instead of "3.0.0")

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
Success! There were no dangerous files found in this plugin1,631 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP62041951,568
CSS20062
JavaScript1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity13.25
▷ Minimum class complexity6.00
▷ Maximum class complexity28.00
Average method complexity9.17
▷ Minimum method complexity3.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/donate.png5.61KB2.44KB▼ 56.47%
images/help.png14.75KB0.56KB▼ 96.18%