99% depublish-posts

Code Review | Depublish Posts

WordPress plugin Depublish Posts scored 99% from 54 tests.

About plugin

  • Plugin page: depublish-posts
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.9
  • WordPress version: 5.8.1
  • First release: Dec 14, 2017
  • Latest release: Dec 14, 2017
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: codesupply (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 662 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼140.02ms] Passed 4 tests

A check of server-side resources used by Depublish Posts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.1937.86 ▲12.66
Dashboard /wp-admin3.17 ▲0.1250.52 ▲11.10
Posts /wp-admin/edit.php3.28 ▲0.1844.65 ▼7.47
Add New Post /wp-admin/post-new.php5.53 ▲0.1095.35 ▼556.53
Media Library /wp-admin/upload.php3.11 ▲0.1032.53 ▼7.18

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Depublish Posts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8316.21 ▲0.666.83 ▼2.7345.68 ▼2.85
Dashboard /wp-admin2,967 ▲335.93 ▼0.00135.94 ▼30.67111.94 ▼9.18
Posts /wp-admin/edit.php2,763 ▲242.69 ▼0.0166.00 ▼5.8592.25 ▲0.49
Add New Post /wp-admin/post-new.php1,511 ▼16118.02 ▼1.11353.46 ▼18.52108.10 ▼0.63
Media Library /wp-admin/upload.php1,810 ▼05.03 ▼0.00144.06 ▼9.00119.06 ▼5.87

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

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 87% 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
Please fix the following attributes:
  • Screenshots: Please a description for screenshot #2 in depublish-posts/assets to your readme.txt
  • Plugin Name: You should set the name of your plugin on the first line ( === depublish-posts === )
You can look at the official readme.txt

depublish-posts/wp-depublish-posts.php 85% from 13 tests

The principal PHP file in "Depublish Posts" v. 1.0.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("depublish-posts.php" instead of "wp-depublish-posts.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
No dangerous file extensions were detected585 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP8134175384
PO File3243093
JavaScript1191072
CSS17036

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity11.83
▷ Minimum class complexity4.00
▷ Maximum class complexity36.00
Average method complexity3.95
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods22
▷ Static methods2195.45%
▷ Public methods2195.45%
▷ Protected methods00.00%
▷ Private methods14.55%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin