10% video-game-life-meter

Code Review | Life Meter Widget

WordPress plugin Life Meter Widget scored10%from 54 tests.

About plugin

  • Plugin page: video-game-life-m...
  • Plugin version: 0.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4.2
  • WordPress version: 6.3.1
  • First release: Oct 9, 2012
  • Latest release: Oct 15, 2012
  • Number of updates: 13
  • Update frequency: every 0.7 days
  • Top authors: bythegram (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,483 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • Install procedure had errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in life_meter_widget is deprecated since version 4.3.0! Use __construct() instead.

Server metrics [RAM: ▼1.97MB] [CPU: ▼50.70ms] Passed 4 tests

Server-side resources used by Life Meter Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.62 ▼29.34
Dashboard /wp-admin2.05 ▼1.306.69 ▼47.23
Posts /wp-admin/edit.php2.05 ▼1.315.73 ▼40.69
Add New Post /wp-admin/post-new.php2.05 ▼3.845.06 ▼85.55
Media Library /wp-admin/upload.php2.05 ▼1.185.01 ▼28.22

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Life Meter Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.07 ▼0.512.02 ▲0.4342.91 ▲5.60
Dashboard /wp-admin2,195 ▲175.60 ▼0.0591.40 ▼20.0841.45 ▼5.40
Posts /wp-admin/edit.php2,103 ▲61.98 ▼0.0334.50 ▼4.0134.25 ▲2.08
Add New Post /wp-admin/post-new.php1,526 ▼022.90 ▼0.17668.67 ▲4.1665.01 ▲9.33
Media Library /wp-admin/upload.php1,403 ▲34.21 ▲0.07104.17 ▲7.5044.69 ▲3.19

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in life_meter_widget is deprecated since version 4.3.0! Use __construct() instead.
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_life_meter_widget
    • theysaidso_admin_options

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 everything seems fine, this is not 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
Please take a closer look at the following
  • 1× 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/video-game-life-meter/lifemeter_plugin.php:18

User-side errors Passed 1 test

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

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
6 plugin tags: widget, old school, plugin, video games, reviews...

video-game-life-meter/lifemeter_plugin.php 92% from 13 tests

The main PHP script in "Life Meter Widget" version 0.1.3 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("video-game-life-meter.php" instead of "lifemeter_plugin.php")

Code Analysis Passed 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 detected143 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1132196
CSS11047

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.04
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
heart.png4.43KB1.25KB▼ 71.67%