89% check-php-memory-peak

Code Review | PHP Peak Memory Checker

WordPress plugin PHP Peak Memory Checker scored89%from 54 tests.

About plugin

  • Plugin page: check-php-memory-...
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.3-6.0
  • WordPress version: 6.3.1
  • First release: Jun 9, 2022
  • Latest release: Jul 8, 2022
  • Number of updates: 19
  • Update frequency: every 1.5 days
  • Top authors: pressmaninc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /777 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.96ms] Passed 4 tests

A check of server-side resources used by PHP Peak Memory Checker
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.86 ▼1.85
Dashboard /wp-admin3.32 ▼0.0344.17 ▼18.58
Posts /wp-admin/edit.php3.37 ▲0.0144.76 ▼1.43
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.72 ▼13.97
Media Library /wp-admin/upload.php3.24 ▲0.0132.22 ▼0.91

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for PHP Peak Memory Checker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.20 ▼1.161.77 ▼0.0740.22 ▼3.73
Dashboard /wp-admin2,209 ▲184.88 ▼1.02100.29 ▼1.0637.19 ▼8.28
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0140.74 ▲2.6835.58 ▲4.44
Add New Post /wp-admin/post-new.php1,535 ▲1523.25 ▲0.04631.06 ▼54.2760.20 ▲6.95
Media Library /wp-admin/upload.php1,388 ▲64.20 ▲0.0499.74 ▼2.3242.79 ▼5.25

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, 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 | 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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: memory, pressman, notification, alert, mail...

check-php-memory-peak/php-peak-memory-checker.php 85% from 13 tests

"PHP Peak Memory Checker" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("check-php-memory-peak.php" instead of "php-peak-memory-checker.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 detected66 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1203966

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods125.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.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
No PNG images were found in this plugin