73% energy-saver

Code Review | Energy Saver

WordPress plugin Energy Saver scored73%from 54 tests.

About plugin

  • Plugin page: energy-saver
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.8.1
  • WordPress version: 6.3.1
  • First release: Mar 5, 2014
  • Latest release: Mar 5, 2014
  • Number of updates: 5
  • Update frequency: every 1.2 days
  • Top authors: StereoAgency (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,360 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼0.80MB] [CPU: ▼31.08ms] Passed 4 tests

This is a short check of server-side resources used by Energy Saver
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0021.95 ▼16.21
Dashboard /wp-admin3.14 ▼0.1627.67 ▼19.90
Posts /wp-admin/edit.php3.14 ▼0.2129.92 ▼16.41
Add New Post /wp-admin/post-new.php3.14 ▼2.7428.33 ▼71.81
Media Library /wp-admin/upload.php3.14 ▼0.0828.16 ▼1.20

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

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

Browser metrics Passed 4 tests

Energy Saver: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲10713.48 ▼0.891.69 ▲0.0142.47 ▲0.89
Dashboard /wp-admin2,245 ▲535.00 ▲0.07114.59 ▲4.3842.66 ▼0.66
Posts /wp-admin/edit.php2,130 ▲412.27 ▲0.2837.33 ▼3.4932.64 ▼6.11
Add New Post /wp-admin/post-new.php1,542 ▲1523.34 ▲0.02644.53 ▼9.6237.47 ▼15.88
Media Library /wp-admin/upload.php1,427 ▲394.27 ▼0.03100.96 ▲1.0443.53 ▼1.46

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
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/energy-saver/sa_energy_saver.php+838
    Undefined index: page
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • sa_es_optimize_settings
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

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 | 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
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/energy-saver/sa_energy_saver.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid url: ""
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
The official readme.txt is a good inspiration

energy-saver/sa_energy_saver.php 85% from 13 tests

"Energy Saver" version 0.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 142 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("energy-saver.php" instead of "sa_energy_saver.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected3,325 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript43762111,890
PHP2234124831
CSS45332547
Markdown133057

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity65.00
▷ Minimum class complexity65.00
▷ Maximum class complexity65.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods45
▷ Static methods00.00%
▷ Public methods45100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
17 PNG files occupy 0.46MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/jquery-ui/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png0.30KB0.15KB▼ 49.68%
lib/jquery-ui/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png0.34KB0.16KB▼ 54.02%
lib/jquery-ui/css/ui-lightness/images/ui-icons_ef8c08_256x240.png4.44KB4.17KB▼ 6.02%
lib/jquery-ui/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png0.41KB0.15KB▼ 62.44%
assets/screenshot-2.png75.64KB25.29KB▼ 66.57%