84% publishing-conditions

Code Review | Publishing Conditions

WordPress plugin Publishing Conditions scored84%from 54 tests.

About plugin

  • Plugin page: publishing-condit...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8.2
  • WordPress version: 6.3.1
  • First release: Sep 21, 2017
  • Latest release: Sep 23, 2017
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: maurobringolf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /817 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.79ms] Passed 4 tests

An overview of server-side resources used by Publishing Conditions
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.18 ▼7.67
Dashboard /wp-admin3.37 ▲0.0648.60 ▼2.32
Posts /wp-admin/edit.php3.48 ▲0.1247.16 ▼4.27
Add New Post /wp-admin/post-new.php5.95 ▲0.0686.18 ▼8.89
Media Library /wp-admin/upload.php3.29 ▲0.0635.76 ▲0.16

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Publishing Conditions: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.26 ▼1.121.76 ▼0.2440.17 ▼3.58
Dashboard /wp-admin2,203 ▲125.79 ▲0.8894.18 ▼17.3440.06 ▼2.20
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0134.43 ▼4.1135.60 ▲1.37
Add New Post /wp-admin/post-new.php1,536 ▲1622.91 ▼0.22658.56 ▲34.6557.14 ▲2.08
Media Library /wp-admin/upload.php1,388 ▼34.21 ▲0.0293.54 ▼5.2241.21 ▼0.18

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function MauroBringolf\\Publishing_Conditions\\add_action() in wp-content/plugins/publishing-conditions/src/class-main.php:49

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
7 plugin tags: verification, writing, publishing, workflow, blogging...

publishing-conditions/publishing-conditions.php Passed 13 tests

The main file in "Publishing Conditions" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
50 characters long description:
Prevent yourself from publishing unfinished posts.

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
Everything looks great! No dangerous files found in this plugin276 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP661166225
PO File1111436
YAML12015

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity4.40
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.74
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces1
Interfaces1
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods25
▷ Static methods14.00%
▷ Public methods2288.00%
▷ Protected methods00.00%
▷ Private methods312.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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin