10% print-this-page

Code Review | Print this page

WordPress plugin Print this page scored10%from 54 tests.

About plugin

  • Plugin page: print-this-page
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Dec 28, 2016
  • Latest release: May 8, 2023
  • Number of updates: 63
  • Update frequency: every 36.8 days
  • Top authors: tawhidurrahmandear (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active /13,065 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/print-this-page/print-this-page.php+20
    Methods with the same name as their class will not be constructors in a future version of PHP; tawhidurrahmandeareightWidget has a deprecated constructor

Server metrics [RAM: ▼1.94MB] [CPU: ▼55.60ms] Passed 4 tests

Server-side resources used by Print this page
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.69 ▼38.87
Dashboard /wp-admin2.08 ▼1.275.42 ▼53.38
Posts /wp-admin/edit.php2.08 ▼1.286.65 ▼37.55
Add New Post /wp-admin/post-new.php2.08 ▼3.816.27 ▼92.59
Media Library /wp-admin/upload.php2.08 ▼1.155.40 ▼29.54

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Print this page
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.24 ▼1.074.99 ▲3.4945.35 ▼2.71
Dashboard /wp-admin2,206 ▲245.84 ▼0.1294.11 ▼10.7737.54 ▼10.09
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.1738.93 ▲2.5135.38 ▼2.30
Add New Post /wp-admin/post-new.php1,546 ▲2718.17 ▼5.32589.83 ▼101.9366.98 ▲13.73
Media Library /wp-admin/upload.php1,388 ▲34.17 ▼0.0596.72 ▼11.1741.62 ▼3.24

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/print-this-page/print-this-page.php+20
    Methods with the same name as their class will not be constructors in a future version of PHP; tawhidurrahmandeareightWidget has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_tawhidurrahmandeareightwidget
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
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)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: print page, printer button, print button, print, pdf

print-this-page/print-this-page.php 92% from 13 tests

The main PHP file in "Print this page" ver. 2.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 244 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin58 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1201358

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
PNG images were not found in this plugin