84% nopeamedia

Code Review | Print PDF Generator and Publisher

WordPress plugin Print PDF Generator and Publisher scored84%from 54 tests.

About plugin

  • Plugin page: nopeamedia
  • Plugin version: 1.1.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.2
  • WordPress version: 6.3.1
  • First release: Sep 4, 2020
  • Latest release: Jun 19, 2023
  • Number of updates: 44
  • Update frequency: every 23.1 days
  • Top authors: verkkovaraani (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,486 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.10MB] [CPU: ▼13.09ms] Passed 4 tests

This is a short check of server-side resources used by Print PDF Generator and Publisher
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1538.28 ▼3.18
Dashboard /wp-admin3.46 ▲0.1647.20 ▼1.54
Posts /wp-admin/edit.php3.60 ▲0.2552.24 ▲1.11
Add New Post /wp-admin/post-new.php5.04 ▼0.8457.48 ▼48.74
Media Library /wp-admin/upload.php3.38 ▲0.1537.76 ▲1.81
Settings /wp-admin/edit.php?post_type=publications&page=publications-settings3.3634.78
Publications /wp-admin/edit.php?post_type=publications3.4340.76
Add New /wp-admin/post-new.php?post_type=publications3.3034.69

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Print PDF Generator and Publisher
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲10913.49 ▼0.901.87 ▲0.1250.73 ▲1.99
Dashboard /wp-admin2,234 ▲494.86 ▼0.01122.88 ▲14.7749.39 ▲8.63
Posts /wp-admin/edit.php2,130 ▲412.01 ▲0.0239.44 ▼1.1935.58 ▲0.37
Add New Post /wp-admin/post-new.php6,275 ▲4,75220.05 ▼3.13923.33 ▲325.9974.20 ▲20.89
Media Library /wp-admin/upload.php1,419 ▲314.15 ▼0.0993.71 ▼9.8539.48 ▼1.46
Settings /wp-admin/edit.php?post_type=publications&page=publications-settings9112.0221.7031.18
Publications /wp-admin/edit.php?post_type=publications1,0801.9832.0531.58
Add New /wp-admin/post-new.php?post_type=publications1,6212.5650.3753.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=publications
    • > Notice in wp-content/plugins/nopeamedia/src/NopMed_Publication.php+195
    Trying to get property 'ID' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=publications
    • > Notice in wp-content/plugins/nopeamedia/src/NopMed_Publication.php+431
    Trying to access array offset on value of type bool

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

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
Please fix the following attributes:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4, #5, #6 in nopeamedia/assets to your readme.txt
You can take inspiration from this readme.txt

nopeamedia/nopeamedia.php 92% from 13 tests

The main PHP script in "Print PDF Generator and Publisher" version 1.1.5 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin11,664 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
SVG30129,424
PHP122792011,202
JSON200387
PO File1170183357
CSS44116289
JavaScript5015

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity24.00
▷ Minimum class complexity6.00
▷ Maximum class complexity74.00
Average method complexity3.35
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods55
▷ Static methods1629.09%
▷ Public methods4480.00%
▷ Protected methods916.36%
▷ Private methods23.64%
Functions13
▷ Named functions861.54%
▷ Anonymous functions538.46%
Constants14
▷ Global constants964.29%
▷ Class constants535.71%
▷ Public constants5100.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
There were not PNG files found in your plugin