84% obvious-post-states

Code Review | Obvious Post States

WordPress plugin Obvious Post States scored84%from 54 tests.

About plugin

  • Plugin page: obvious-post-states
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.3
  • WordPress version: 6.3.1
  • First release: Sep 30, 2014
  • Latest release: Aug 23, 2015
  • Number of updates: 7
  • Update frequency: every 46.6 days
  • Top authors: ryansommers (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /2,044 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: ▼2.68ms] Passed 4 tests

Server-side resources used by Obvious Post States
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.88 ▼4.46
Dashboard /wp-admin3.32 ▲0.0145.81 ▼7.20
Posts /wp-admin/edit.php3.37 ▲0.0153.04 ▲4.56
Add New Post /wp-admin/post-new.php5.92 ▲0.0392.58 ▼2.75
Media Library /wp-admin/upload.php3.24 ▲0.0138.08 ▲3.69

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Obvious Post States: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9813.18 ▼0.805.90 ▲4.1338.39 ▼10.08
Dashboard /wp-admin2,210 ▲225.05 ▼0.80110.02 ▼10.3643.25 ▼0.37
Posts /wp-admin/edit.php2,093 ▲42.07 ▲0.0640.61 ▲2.4937.68 ▲4.67
Add New Post /wp-admin/post-new.php1,525 ▲13323.22 ▲4.83599.39 ▼68.8456.37 ▲9.89
Media Library /wp-admin/upload.php1,395 ▲74.26 ▲0.0696.24 ▼0.2142.29 ▲0.01

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/obvious-post-states/obvious-post-states.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: pending, password protected, post state, drafts, ryan sommers...

obvious-post-states/obvious-post-states.php Passed 13 tests

The main PHP file in "Obvious Post States" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
76 characters long description:
Make your WordPress post state text (draft, pending, sticky, etc) stand out.

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 plugin69 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS10042
PHP14920
JavaScript1207

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 were not PNG files found in your plugin