84% page-peel

Code Review | Page Peel

WordPress plugin Page Peel scored84%from 54 tests.

About plugin

  • Plugin page: page-peel
  • Plugin version: 1.0
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-5.8
  • WordPress version: 6.3.1
  • First release: Apr 5, 2008
  • Latest release: Nov 1, 2021
  • Number of updates: 22
  • Update frequency: every 225.5 days
  • Top authors: Avram (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /64,293 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Page Peel
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.74 ▲4.90
Dashboard /wp-admin3.33 ▼0.0143.43 ▼13.48
Posts /wp-admin/edit.php3.38 ▲0.0343.76 ▲2.11
Add New Post /wp-admin/post-new.php5.91 ▲0.0278.10 ▼4.43
Media Library /wp-admin/upload.php3.25 ▲0.0235.53 ▲5.36
Page Peel /wp-admin/options-general.php?page=page_peel3.2229.82

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
pagepeel_settings

Browser metrics Passed 4 tests

A check of browser resources used by Page Peel
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.35 ▲0.071.83 ▲0.2245.86 ▲1.56
Dashboard /wp-admin2,196 ▲165.53 ▼0.0981.86 ▼2.9039.67 ▼3.31
Posts /wp-admin/edit.php2,104 ▲42.00 ▲0.0134.78 ▼3.6233.22 ▼1.81
Add New Post /wp-admin/post-new.php1,532 ▲423.33 ▲0.23646.23 ▼21.0153.64 ▼1.81
Media Library /wp-admin/upload.php1,401 ▲44.23 ▼0.00102.24 ▼7.1343.61 ▲0.89
Page Peel /wp-admin/options-general.php?page=page_peel8172.0323.5025.09

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • pagepeel_settings
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 3× 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/page-peel/src/options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/page-peel/src/options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/page-peel/src/pagepeel.php:72

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Page Peel Ad), #2 (Page Peel Ad, when hovered with mouse)
Please take inspiration from this readme.txt

page-peel/pagepeel.php 92% from 13 tests

The main PHP script in "Page Peel" version 1.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("page-peel.php" instead of "pagepeel.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin162 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP34217162

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.03
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%
Functions9
▷ Named functions9100.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.41MB with 0.27MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png86.64KB23.24KB▼ 73.18%
screenshot-2.png331.77KB139.70KB▼ 57.89%