73% itman-page-speed-insights

Code Review | Page Speed Insights

WordPress plugin Page Speed Insights scored73%from 54 tests.

About plugin

  • Plugin page: itman-page-speed-...
  • Plugin version: 1.0.6
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.2
  • WordPress version: 6.3.1
  • First release: May 9, 2019
  • Latest release: Jun 26, 2023
  • Number of updates: 11
  • Update frequency: every 137.5 days
  • Top authors: matejpodstrelenec (72.73%)stefanpejcic (36.36%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,108 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.59ms] Passed 4 tests

An overview of server-side resources used by Page Speed Insights
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0138.61 ▼3.75
Dashboard /wp-admin3.32 ▼0.0250.42 ▼11.12
Posts /wp-admin/edit.php3.38 ▲0.0250.34 ▲1.07
Add New Post /wp-admin/post-new.php5.92 ▲0.0494.84 ▼13.48
Media Library /wp-admin/upload.php3.25 ▲0.0234.32 ▼1.99
Page Speed Insights /wp-admin/tools.php?page=itman-page-speed-insights3.2639.06

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 15 new files
Database: 1 new table, 8 new options
New tables
wp_itman_page_speed_insights
New WordPress options
itps_status
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
itps_db_version
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Page Speed Insights
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲9914.78 ▲0.411.96 ▲0.1344.05 ▲1.30
Dashboard /wp-admin2,251 ▲715.87 ▲0.20100.09 ▲8.0943.04 ▼1.22
Posts /wp-admin/edit.php2,112 ▲92.44 ▲0.4233.43 ▼9.0432.95 ▼6.51
Add New Post /wp-admin/post-new.php1,540 ▲1423.29 ▼0.41613.89 ▼49.1652.41 ▼12.31
Media Library /wp-admin/upload.php1,409 ▲64.44 ▲0.2498.15 ▼7.7844.08 ▼1.65
Page Speed Insights /wp-admin/tools.php?page=itman-page-speed-insights9113.2642.9928.81

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/itman-page-speed-insights/itman-page-speed-insights.php
    • > /wp-content/plugins/itman-page-speed-insights/admin/admin.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/itman-page-speed-insights/includes/dashboardWidget.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/itman-page-speed-insights/admin/settings-page.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/tools.php?page=itman-page-speed-insights
    • > Javascript (severe) in unknown
    https://www.gstatic.com/charts/51/js/jsapi_compiled_default_module.js 143:187 Uncaught Error: Container is not defined

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Donate link: Invalid URI ("")
Please take inspiration from this readme.txt

itman-page-speed-insights/itman-page-speed-insights.php Passed 13 tests

The main PHP script in "Page Speed Insights" version 1.0.6 is automatically included on every request by WordPress
82 characters long description:
Displays and measures page performance according to the Google PageSpeed Insights.

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
Success! There were no dangerous files found in this plugin582 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP7132105400
PO File1283197
JavaScript17352
CSS16633

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/author.png33.04KB20.52KB▼ 37.88%
images/icon-512x512.png54.54KB21.90KB▼ 59.85%