83% hiweb-memory-usage

Code Review | hiWeb Memory Usage

WordPress plugin hiWeb Memory Usage scored83%from 54 tests.

About plugin

  • Plugin page: hiweb-memory-usage
  • Plugin version: 1.3.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Sep 9, 2015
  • Latest release: Oct 8, 2016
  • Number of updates: 10
  • Update frequency: every 39.5 days
  • Top authors: Den Media (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,879 total downloads

Benchmarks

Plugin footprint 83% 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.01MB] [CPU: ▼4.49ms] Passed 4 tests

This is a short check of server-side resources used by hiWeb Memory Usage
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0140.79 ▲1.88
Dashboard /wp-admin3.32 ▲0.0253.81 ▼2.00
Posts /wp-admin/edit.php3.37 ▲0.0148.09 ▼5.82
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.73 ▼4.76
Media Library /wp-admin/upload.php3.24 ▲0.0136.41 ▼5.36

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for hiWeb Memory Usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8514.45 ▲0.052.01 ▲0.3345.26 ▲3.66
Dashboard /wp-admin2,208 ▲204.86 ▲0.01104.56 ▼0.1440.85 ▼1.14
Posts /wp-admin/edit.php2,094 ▲52.05 ▲0.0435.40 ▼5.9733.05 ▼7.02
Add New Post /wp-admin/post-new.php1,550 ▲1519.97 ▼3.19679.94 ▲10.9155.46 ▼2.44
Media Library /wp-admin/upload.php1,390 ▲54.19 ▲0.04100.01 ▼3.2143.74 ▲0.38

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hiweb-memory-usage/hiweb-memoryusage.php:53

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
  • Donate link: Please fix this invalid url: ""
  • Screenshots: Screenshot #1 (It looks like that this plugin))) image required
Please take inspiration from this readme.txt

hiweb-memory-usage/hiweb-memoryusage.php 92% from 13 tests

Analyzing the main PHP file in "hiWeb Memory Usage" version 1.3.0.0
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("hiweb-memory-usage.php" instead of "hiweb-memoryusage.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected45 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP116645

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.32
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png62.98KB26.01KB▼ 58.71%