78% woo-admin-product-notes

Code Review | Woo Admin Product Notes

WordPress plugin Woo Admin Product Notes scored 78% from 54 tests.

About plugin

  • Plugin page: woo-admin-product...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.3-4.9
  • WordPress version: 5.8.1
  • First release: Jul 25, 2018
  • Latest release: Aug 2, 2018
  • Number of updates: 12
  • Update frequency: every 0.7 days
  • Top authors: oloyede jamiu (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active / 501 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲4.00MB] [CPU: ▼650.82ms] Passed 4 tests

Analyzing server-side resources used by Woo Admin Product Notes
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /7.40 ▲4.5664.06 ▼1,870.79
Dashboard /wp-admin7.42 ▲4.3568.70 ▼131.19
Posts /wp-admin/edit.php7.42 ▲4.3160.66 ▼10.55
Add New Post /wp-admin/post-new.php8.39 ▲2.95110.77 ▼590.74
Media Library /wp-admin/upload.php7.42 ▲4.4160.54 ▲3.03
Freemius Debug [v.2.1.2] /wp-admin/admin.php?page=freemius7.4252.04
Woo Admin Product Notes /wp-admin/admin.php?page=woo-admin-product-notes7.4251.56

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 196 new files
Database: no new tables, 5 new options
New WordPress options
fs_api_cache
fs_active_plugins
fs_accounts
fs_debug_mode
fs_gdpr

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woo Admin Product Notes
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,728 ▲9916.24 ▲0.4311.89 ▼92.5950.23 ▼726.56
Dashboard /wp-admin2,995 ▲525.91 ▲0.00143.87 ▼877.86136.46 ▼263.09
Posts /wp-admin/edit.php2,766 ▲272.70 ▲0.0078.39 ▲5.19101.13 ▼2.74
Add New Post /wp-admin/post-new.php1,700 ▲1815.76 ▲2.00425.70 ▼630.85124.48 ▼41.85
Media Library /wp-admin/upload.php1,832 ▲255.03 ▼0.00161.71 ▼25.90153.91 ▲17.84
Freemius Debug [v.2.1.2] /wp-admin/admin.php?page=freemius1,4772.1259.8093.83
Woo Admin Product Notes /wp-admin/admin.php?page=woo-admin-product-notes1,2892.1759.70106.81

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 5 options
    • fs_accounts
    • fs_gdpr
    • fs_debug_mode
    • fs_active_plugins
    • fs_api_cache

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/woo-admin-product-notes/freemius/templates/ajax-loader.php
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woo-admin-product-notes/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woo-admin-product-notes/freemius/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/woo-admin-product-notes/freemius/templates/account/partials/addon.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/woo-admin-product-notes/freemius/templates/partials/network-activation.php:6
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/woo-admin-product-notes/freemius/templates/account/partials/addon.php:9
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/woo-admin-product-notes/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woo-admin-product-notes/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/woo-admin-product-notes/freemius/templates/account/partials/addon.php on line 6

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

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: woo product notes, admin product notes, product notes, woocommerce admin product notes, woo admin product notes

woo-admin-product-notes/woo-admin-product-notes.php 85% from 13 tests

This is the main PHP file of "Woo Admin Product Notes" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("3.0.1" instead of "3.4.3")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected37,234 lines of code in 155 files:
LanguageFilesBlank linesComment linesLines of code
PHP1046,05214,00025,207
PO File94,2164,9449,156
Sass25390772,443
JavaScript33459194
Markdown1610192
JSON10027
CSS120015

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 2,244)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity71.51
▷ Minimum class complexity1.00
▷ Maximum class complexity2,244.00
Average method complexity4.21
▷ Minimum method complexity1.00
▷ Maximum method complexity83.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes45
▷ Abstract classes24.44%
▷ Concrete classes4395.56%
▷ Final classes00.00%
Methods1,020
▷ Static methods15815.49%
▷ Public methods71770.29%
▷ Protected methods151.47%
▷ Private methods28828.24%
Functions93
▷ Named functions93100.00%
▷ Anonymous functions00.00%
Constants116
▷ Global constants9682.76%
▷ Class constants2017.24%
▷ Public constants20100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/woo-admin-product-notes.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%