78% print-o-matic

Code Review | Print-O-Matic

WordPress plugin Print-O-Matic scored78%from 54 tests.

About plugin

  • Plugin page: print-o-matic
  • Plugin version: 2.1.10
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 10, 2012
  • Latest release: Feb 22, 2023
  • Number of updates: 124
  • Update frequency: every 30.3 days
  • Top authors: baden03 (100%)

Code review

54 tests

User reviews

99 reviews

Install metrics

10,000+ active /267,977 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

This is a short check of server-side resources used by Print-O-Matic
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.65 ▼3.73
Dashboard /wp-admin3.31 ▲0.0150.54 ▲0.03
Posts /wp-admin/edit.php3.37 ▲0.0155.03 ▲3.61
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.58 ▼5.85
Media Library /wp-admin/upload.php3.24 ▲0.0134.62 ▼3.36
Print-O-Matic /wp-admin/options-general.php?page=print-o-matic-options3.2233.72

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Print-O-Matic
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲14513.38 ▼0.979.43 ▲7.8643.48 ▼0.46
Dashboard /wp-admin2,202 ▲225.59 ▲0.0287.85 ▼5.7136.39 ▼21.79
Posts /wp-admin/edit.php2,104 ▲12.03 ▲0.0140.29 ▲2.6934.59 ▼1.61
Add New Post /wp-admin/post-new.php1,529 ▲123.37 ▲0.26619.91 ▼79.0261.02 ▲8.98
Media Library /wp-admin/upload.php1,407 ▲74.23 ▲0.0297.42 ▼18.1844.46 ▼3.41
Print-O-Matic /wp-admin/options-general.php?page=print-o-matic-options1,4774.3496.7551.04

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% 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 fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/print-o-matic/print-o-matic.php:451

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=print-o-matic-options
    • > Network (severe)
    wp-content/plugins/print-o-matic/css/admin_style.css?ver=1.0.0 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: A description for screenshot #2 is required in print-o-matic/assets to your readme.txt
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt might help

print-o-matic/print-o-matic.php Passed 13 tests

The main PHP file in "Print-O-Matic" ver. 2.1.10 adds more information about the plugin and also serves as the entry point for this plugin
112 characters long description:
Shortcode that adds a printer icon, allowing the user to print the post or a specified HTML element in the post.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin619 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP14358372
JavaScript32612162
CSS19051
Markdown18034

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity4.22
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/print-icon.png3.92KB1.25KB▼ 68.14%
css/print-icon-small.png0.59KB0.45KB▼ 23.93%
css/print-icon-small-black.png0.18KB0.13KB▼ 29.28%
css/print-icon-small-white.png0.18KB0.13KB▼ 30.81%
css/print-icon-small-grey.png0.18KB0.13KB▼ 29.28%