78% bug-library

Code Review | Bug Library

WordPress plugin Bug Library scored78%from 54 tests.

About plugin

  • Plugin page: bug-library
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 25, 2011
  • Latest release: Oct 10, 2023
  • Number of updates: 86
  • Update frequency: every 54.5 days
  • Top authors: jackdewey (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /11,486 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
Installer ran successfully

Server metrics [RAM: ▲0.56MB] [CPU: ▼0.62ms] Passed 4 tests

A check of server-side resources used by Bug Library
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.07 ▲0.6045.91 ▲4.33
Dashboard /wp-admin3.91 ▲0.5651.48 ▼10.25
Posts /wp-admin/edit.php3.96 ▲0.6151.39 ▲4.36
Add New Post /wp-admin/post-new.php6.43 ▲0.55111.48 ▲10.09
Media Library /wp-admin/upload.php3.77 ▲0.5437.32 ▼0.93
General Options /wp-admin/edit.php?post_type=bug-library-bugs&page=bug-library-general-options3.7741.28
Bugs /wp-admin/edit.php?post_type=bug-library-bugs3.8942.18
Status /wp-admin/edit-tags.php?taxonomy=bug-library-status&post_type=bug-library-bugs3.7940.25
Products /wp-admin/edit-tags.php?taxonomy=bug-library-products&post_type=bug-library-bugs3.7941.82
Stylesheet /wp-admin/edit.php?post_type=bug-library-bugs&page=bug-library-stylesheet3.7737.12
Types /wp-admin/edit-tags.php?taxonomy=bug-library-types&post_type=bug-library-bugs3.7942.64
Priority /wp-admin/edit-tags.php?taxonomy=bug-library-priority&post_type=bug-library-bugs3.7937.93
Instructions /wp-admin/edit.php?post_type=bug-library-bugs&page=bug-library-instructions3.7737.11
Add New /wp-admin/post-new.php?post_type=bug-library-bugs3.9958.84

Server storage [IO: ▲1.15MB] [DB: ▲0.01MB] Passed 3 tests

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

Browser metrics Passed 4 tests

A check of browser resources used by Bug Library
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,874 ▲11314.35 ▼0.061.76 ▲0.0947.64 ▲0.13
Dashboard /wp-admin2,274 ▲945.72 ▲0.0585.50 ▼12.7240.48 ▼1.22
Posts /wp-admin/edit.php2,180 ▲802.07 ▲0.0837.50 ▼3.8332.41 ▼4.41
Add New Post /wp-admin/post-new.php1,579 ▲3123.31 ▲5.03592.56 ▼56.8750.26 ▼17.70
Media Library /wp-admin/upload.php1,476 ▲794.29 ▲0.0595.01 ▲2.9840.80 ▲0.59
General Options /wp-admin/edit.php?post_type=bug-library-bugs&page=bug-library-general-options1,5932.3741.6432.60
Bugs /wp-admin/edit.php?post_type=bug-library-bugs1,2742.0333.1832.59
Status /wp-admin/edit-tags.php?taxonomy=bug-library-status&post_type=bug-library-bugs1,4452.3630.1830.58
Products /wp-admin/edit-tags.php?taxonomy=bug-library-products&post_type=bug-library-bugs1,4452.2729.6131.54
Stylesheet /wp-admin/edit.php?post_type=bug-library-bugs&page=bug-library-stylesheet9982.2136.7731.74
Types /wp-admin/edit-tags.php?taxonomy=bug-library-types&post_type=bug-library-bugs1,4482.3629.5530.44
Priority /wp-admin/edit-tags.php?taxonomy=bug-library-priority&post_type=bug-library-bugs1,4422.3428.0327.04
Instructions /wp-admin/edit.php?post_type=bug-library-bugs&page=bug-library-instructions9972.2337.6024.53
Add New /wp-admin/post-new.php?post_type=bug-library-bugs2,9618.10178.5179.98

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

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/bug-library/captcha/easycaptcha.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/bug-library/single-bug-library-bugs.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/bug-library/bug-library.php:48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/bug-library/submitnewissue.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Bug Listing), #2 (Form to report new issues)
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can look at the official readme.txt

bug-library/bug-library.php Passed 13 tests

Analyzing the main PHP file in "Bug Library" version 2.1
54 characters long description:
Display bug manager on pages with a variety of options

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin6,938 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP109621,2555,243
JavaScript3199103810
CSS49673476
PO File1164171387
XML11922

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 153)
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity214.20
▷ Minimum class complexity41.00
▷ Maximum class complexity400.00
Average method complexity8.18
▷ Minimum method complexity1.00
▷ Maximum method complexity153.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods148
▷ Static methods10.68%
▷ Public methods148100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants25
▷ Global constants25100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
17 PNG files occupy 0.08MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png3.67KB1.93KB▼ 47.53%
css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png0.12KB0.16KB0.00%
css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png0.25KB0.15KB▼ 37.45%
css/ui-lightness/images/ui-icons_228ef1_256x240.png4.27KB4.11KB▼ 3.78%