89% badges-woo

Code Review | Badges Woo

WordPress plugin Badges Woo scored 89% from 54 tests.

About plugin

  • Plugin page: badges-woo
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.0.1
  • WordPress version: 6.3.1
  • First release: May 5, 2020
  • Latest release: Aug 28, 2022
  • Number of updates: 24
  • Update frequency: every 35.2 days
  • Top authors: taxarpro (91.67%)DanielRiera (12.5%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 5,844 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.90ms] Passed 4 tests

An overview of server-side resources used by Badges Woo
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.76 ▼5.61
Dashboard /wp-admin3.34 ▲0.0355.20 ▲2.20
Posts /wp-admin/edit.php3.39 ▲0.0349.34 ▲0.32
Add New Post /wp-admin/post-new.php5.92 ▲0.0389.70 ▼12.52
Media Library /wp-admin/upload.php3.26 ▲0.0334.40 ▲4.22

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Badges Woo
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.20 ▼1.101.74 ▼0.2542.76 ▼6.06
Dashboard /wp-admin2,206 ▲185.09 ▲0.18105.49 ▼12.2141.10 ▼7.21
Posts /wp-admin/edit.php2,086 ▼31.99 ▼0.0137.90 ▲0.9732.21 ▼1.35
Add New Post /wp-admin/post-new.php1,534 ▲123.03 ▼0.18676.94 ▲6.2952.23 ▲0.21
Media Library /wp-admin/upload.php1,391 ▲64.23 ▲0.0196.47 ▼7.2339.70 ▼4.07

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: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 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)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: custom, badges, conversion

badges-woo/woobadges.php 85% from 13 tests

The main PHP file in "Badges Woo" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.5" instead of "3.0")
  • Main file name: Name the main plugin file the same as the plugin slug ("badges-woo.php" instead of "woobadges.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected520 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP26919270
CSS1143137
PO File2181872
JavaScript27141

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.68
Average class complexity31.00
▷ Minimum class complexity31.00
▷ Maximum class complexity31.00
Average method complexity3.73
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.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
14 PNG files occupy 0.36MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/right-top.png3.83KB2.12KB▼ 44.63%
img/none.png4.92KB2.78KB▼ 43.51%
img/left.png2.14KB0.81KB▼ 62.25%
img/bottom.png2.09KB0.14KB▼ 93.38%
img/right.png2.12KB0.79KB▼ 62.54%