84% the-publisher-desk

Code Review | The Publisher Desk

WordPress plugin The Publisher Desk scored84%from 54 tests.

About plugin

  • Plugin page: the-publisher-desk
  • Plugin version: 1.0.18
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Jun 4, 2014
  • Latest release: Nov 29, 2016
  • Number of updates: 59
  • Update frequency: every 15.4 days
  • Top authors: thepublisherdesk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,012 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.09ms] Passed 4 tests

Analyzing server-side resources used by The Publisher Desk
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.14 ▼1.68
Dashboard /wp-admin3.34 ▲0.0445.38 ▼4.52
Posts /wp-admin/edit.php3.39 ▲0.0444.78 ▼3.60
Add New Post /wp-admin/post-new.php5.92 ▲0.0487.27 ▼2.54
Media Library /wp-admin/upload.php3.26 ▲0.0436.23 ▲0.21

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
publisher_desk_promoted_page_id
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by The Publisher Desk
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲10513.29 ▼0.994.86 ▲3.1540.28 ▼8.77
Dashboard /wp-admin2,221 ▲335.82 ▼0.01100.97 ▼17.6678.55 ▲34.15
Posts /wp-admin/edit.php2,104 ▲152.14 ▼0.0435.85 ▲0.2832.38 ▼1.93
Add New Post /wp-admin/post-new.php1,681 ▲14522.32 ▼0.84690.00 ▲13.0048.39 ▼3.67
Media Library /wp-admin/upload.php1,403 ▲214.25 ▼0.00116.20 ▲17.4146.10 ▲2.30

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 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 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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined index: publisher_desk_hidden in wp-content/plugins/the-publisher-desk/templates/settings.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/the-publisher-desk/templates/settings.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: ads, advertising, monetization

the-publisher-desk/publisher-desk.php 92% from 13 tests

"The Publisher Desk" version 1.0.18's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("the-publisher-desk.php" instead of "publisher-desk.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected404 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP28459271
HTML91653133

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
files/images/favicon.png1.37KB0.56KB▼ 58.97%