78% bizlibrary

Code Review | BizLibrary

WordPress plugin BizLibrary scored78%from 54 tests.

About plugin

  • Plugin page: bizlibrary
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 6.3.1
  • First release: Apr 14, 2014
  • Latest release: Apr 16, 2014
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: mjgarvi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /790 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼1.81ms] Passed 4 tests

This is a short check of server-side resources used by BizLibrary
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1244.57 ▲0.86
Dashboard /wp-admin3.48 ▲0.1474.98 ▲6.90
Posts /wp-admin/edit.php3.45 ▲0.1049.32 ▲1.53
Add New Post /wp-admin/post-new.php5.98 ▲0.1094.01 ▼8.30
Media Library /wp-admin/upload.php3.32 ▲0.1037.01 ▼1.32
BizLibrary /wp-admin/options-general.php?page=bizlibrary3.2733.09

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for BizLibrary
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.75 ▲0.352.00 ▼0.0841.81 ▼0.77
Dashboard /wp-admin2,202 ▲255.65 ▼0.0291.37 ▼10.9743.22 ▲0.41
Posts /wp-admin/edit.php2,101 ▼22.04 ▲0.0340.01 ▲4.9637.97 ▲3.15
Add New Post /wp-admin/post-new.php1,552 ▲2023.22 ▼0.08636.91 ▼26.6651.58 ▼2.38
Media Library /wp-admin/upload.php1,404 ▲44.21 ▲0.06111.28 ▲2.7746.86 ▲0.69
BizLibrary /wp-admin/options-general.php?page=bizlibrary9342.0323.1531.39

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=bizlibrary
    • > Notice in wp-content/plugins/bizlibrary/bizlibrary.php+408
    Trying to access array offset on value of type bool

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
Please fix the following items
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bizlibrary/bizlibrary.php:33
    • > PHP Fatal error
      require_once(): Failed opening required 'File/ASN1.php' (include_path='.:/usr/share/php') in wp-content/plugins/bizlibrary/phpseclib/X509.php on line 51
    • > PHP Warning
      require_once(Math/BigInteger.php): failed to open stream: No such file or directory in wp-content/plugins/bizlibrary/phpseclib/ASN1.php on line 48
    • > PHP Warning
      require_once(Math/BigInteger.php): failed to open stream: No such file or directory in wp-content/plugins/bizlibrary/phpseclib/SSH1.php on line 75
    • > PHP Warning
      require_once(File/ASN1.php): failed to open stream: No such file or directory in wp-content/plugins/bizlibrary/phpseclib/X509.php on line 51
    • > PHP Fatal error
      require_once(): Failed opening required 'Math/BigInteger.php' (include_path='.:/usr/share/php') in wp-content/plugins/bizlibrary/phpseclib/SSH1.php on line 75
    • > PHP Fatal error
      require_once(): Failed opening required 'Math/BigInteger.php' (include_path='.:/usr/share/php') in wp-content/plugins/bizlibrary/phpseclib/ASN1.php on line 48
    • > PHP Fatal error
      require_once(): Failed opening required 'Math/BigInteger.php' (include_path='.:/usr/share/php') in wp-content/plugins/bizlibrary/phpseclib/RSA.php on line 76
    • > PHP Warning
      require_once(Math/BigInteger.php): failed to open stream: No such file or directory in wp-content/plugins/bizlibrary/phpseclib/RSA.php on line 76

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === bizlibrary === )
The official readme.txt is a good inspiration

bizlibrary/bizlibrary.php 92% from 13 tests

The main file in "BizLibrary" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin13,640 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP162,5828,52813,640

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 111)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity164.40
▷ Minimum class complexity1.00
▷ Maximum class complexity433.00
Average method complexity7.19
▷ Minimum method complexity1.00
▷ Maximum method complexity111.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods396
▷ Static methods00.00%
▷ Public methods396100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants161
▷ Global constants161100.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
There were not PNG files found in your plugin