84% plerdy-heatmap

Code Review | Website Optimization – Plerdy

WordPress plugin Website Optimization – Plerdy scored84%from 54 tests.

About plugin

  • Plugin page: plerdy-heatmap
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-6.3
  • WordPress version: 6.3.1
  • First release: Oct 12, 2017
  • Latest release: Oct 9, 2023
  • Number of updates: 94
  • Update frequency: every 23.3 days
  • Top authors: plerdy (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /8,093 total downloads

Benchmarks

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

This is a short check of server-side resources used by Website Optimization – Plerdy
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.51 ▼10.32
Dashboard /wp-admin3.32 ▲0.0249.75 ▼1.23
Posts /wp-admin/edit.php3.37 ▲0.0247.06 ▼0.93
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.66 ▼12.78
Media Library /wp-admin/upload.php3.24 ▲0.0235.26 ▼1.19

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Website Optimization – Plerdy
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲4614.38 ▲0.141.63 ▼0.4440.81 ▼3.55
Dashboard /wp-admin2,213 ▲335.59 ▼0.1084.77 ▼17.3062.78 ▲19.02
Posts /wp-admin/edit.php2,115 ▲121.99 ▼0.0437.60 ▼3.6635.64 ▼1.80
Add New Post /wp-admin/post-new.php1,551 ▲1122.93 ▼0.19767.56 ▲72.4849.21 ▼0.32
Media Library /wp-admin/upload.php1,412 ▲214.22 ▲0.03100.93 ▲2.8474.17 ▲30.79

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% 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 take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/plerdy-heatmap/plerdy_heatmap_tracking.php:132
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/plerdy-heatmap/views/options.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
These attributes need to be fixed:
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4, #5, #6 in plerdy-heatmap/assets to your readme.txt
The official readme.txt is a good inspiration

plerdy-heatmap/plerdy_heatmap_tracking.php 92% from 13 tests

The principal PHP file in "Website Optimization – Plerdy" v. 1.3.2 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("plerdy-heatmap.php" instead of "plerdy_heatmap_tracking.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected132 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22121132

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/plerdy.png18.89KB8.26KB▼ 56.29%
images/icon.png1.18KB0.85KB▼ 27.89%