100% page-size-checker

Code Review | Page Size Checker

WordPress plugin Page Size Checker scored 100% from 54 tests.

About plugin

  • Plugin page: page-size-checker
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5.1-5.4
  • WordPress version: 5.8.1
  • First release: Jun 6, 2017
  • Latest release: Apr 28, 2020
  • Number of updates: 5
  • Update frequency: every 211.4 days
  • Top authors: seorankanalyser (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 1,344 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Page Size Checker
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0038.95 ▲1.80
Dashboard /wp-admin3.06 ▲0.0146.61 ▼2.19
Posts /wp-admin/edit.php3.12 ▲0.0147.10 ▼5.16
Add New Post /wp-admin/post-new.php5.42 ▼0.01106.86 ▼565.54
Media Library /wp-admin/upload.php3.01 ▲0.0139.46 ▲2.49

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Page Size Checker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,722 ▲12615.79 ▲0.229.68 ▼2.0852.14 ▲0.48
Dashboard /wp-admin2,982 ▲485.89 ▼0.06148.11 ▼10.85129.69 ▲16.03
Posts /wp-admin/edit.php2,773 ▲342.69 ▼0.0068.64 ▼12.1594.30 ▼13.92
Add New Post /wp-admin/post-new.php1,696 ▲11517.79 ▲2.48377.58 ▼62.08130.99 ▲6.92
Media Library /wp-admin/upload.php1,767 ▼435.02 ▲0.01152.79 ▼29.50158.54 ▲28.64

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: bandwidth, speed, web space, page size checker

page-size-checker/page-size-checker.php 92% from 13 tests

The main PHP script in "Page Size Checker" version 1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 204 characters long)

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
Good job! No executable or dangerous file extensions detected220 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS1211128
PHP2441189
JavaScript1023

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/pagesizechecker.png36.27KB12.68KB▼ 65.05%
assets/images/logo.png3.49KB1.18KB▼ 66.06%
assets/images/arrow.png2.87KB0.15KB▼ 94.62%