74% live-your-legend-badge

Code Review | Live Your Legend Badge

WordPress plugin Live Your Legend Badge scored74%from 54 tests.

About plugin

  • Plugin page: live-your-legend-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.3.1
  • WordPress version: 6.3.1
  • First release: Nov 21, 2015
  • Latest release: Nov 21, 2015
  • Number of updates: 13
  • Update frequency: N/A
  • Top authors: magicinfluence (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /545 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.72MB] [CPU: ▼55.63ms] Passed 4 tests

A check of server-side resources used by Live Your Legend Badge
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.189.00 ▼33.56
Dashboard /wp-admin2.29 ▼1.0511.38 ▼59.57
Posts /wp-admin/edit.php2.29 ▼1.0611.29 ▼37.71
Add New Post /wp-admin/post-new.php2.29 ▼3.5912.50 ▼91.68
Media Library /wp-admin/upload.php2.29 ▼0.949.26 ▼26.34

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_lylbadge_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Live Your Legend Badge
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲4413.22 ▼1.435.10 ▲3.0440.70 ▼2.78
Dashboard /wp-admin2,212 ▲95.76 ▲0.8596.60 ▼7.7539.85 ▼5.44
Posts /wp-admin/edit.php2,100 ▲32.04 ▲0.0439.76 ▲2.6435.12 ▼1.65
Add New Post /wp-admin/post-new.php1,555 ▲2418.26 ▼5.16628.01 ▼71.9556.89 ▼2.47
Media Library /wp-admin/upload.php1,397 ▼34.22 ▼0.09100.69 ▼11.0044.12 ▼4.17

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/live-your-legend-badge/lyl-widget.php+19
    Undefined index: lylbadge.png
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_lylbadge_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/live-your-legend-badge/lyl-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/live-your-legend-badge/lyl-widget.php:2

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

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: live your legend, live your legend badge, live your legend sidebar, widget, live your legend widget

live-your-legend-badge/index.php 92% from 13 tests

The entry point to "Live Your Legend Badge" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("live-your-legend-badge.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected75 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP253175

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/lylbadge.png22.84KB11.57KB▼ 49.35%
images/badges/lylbadge.png22.84KB11.57KB▼ 49.35%