84% post-descriptions

Code Review | Post Descriptions

WordPress plugin Post Descriptions scored84%from 54 tests.

About plugin

  • Plugin page: post-descriptions
  • Plugin version: 1.2.2
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-6.0
  • WordPress version: 6.3.1
  • First release: May 13, 2021
  • Latest release: Jun 1, 2022
  • Number of updates: 24
  • Update frequency: every 16.0 days
  • Top authors: tomjdevisser (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /2,139 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.02ms] Passed 4 tests

A check of server-side resources used by Post Descriptions
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0236.78 ▼6.94
Dashboard /wp-admin3.33 ▲0.0346.24 ▼7.43
Posts /wp-admin/edit.php3.38 ▲0.0348.09 ▼3.88
Add New Post /wp-admin/post-new.php5.91 ▲0.0385.68 ▼13.82
Media Library /wp-admin/upload.php3.25 ▲0.0234.89 ▼2.50
Post Descriptions /wp-admin/options-general.php?page=postdescriptions3.2233.49

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Post Descriptions
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.69 ▲0.281.85 ▲0.1941.15 ▼0.06
Dashboard /wp-admin2,202 ▲225.59 ▼0.0792.88 ▲4.7639.62 ▼6.60
Posts /wp-admin/edit.php2,142 ▲421.98 ▲0.0034.24 ▼2.0034.94 ▼2.05
Add New Post /wp-admin/post-new.php6,229 ▲4,70025.93 ▲2.81864.73 ▲218.2253.34 ▼0.32
Media Library /wp-admin/upload.php1,407 ▲74.28 ▲0.1398.51 ▼7.9241.38 ▼0.84
Post Descriptions /wp-admin/options-general.php?page=postdescriptions9582.3442.0727.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-descriptions/inc/admin-columns.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-descriptions/inc/settings.php:42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-descriptions/inc/add-quick-edit.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/post-descriptions/inc/update-post-states.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-descriptions/inc/add-post-states.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/post-descriptions/inc/register-admin-columns.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: pages, posts, ui, organize, admin

post-descriptions/post-descriptions.php 92% from 13 tests

The main file in "Post Descriptions" v. 1.2.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 162 characters long)

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 detected342 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP82363320
Markdown114017
JavaScript1015

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions20
▷ Named functions1995.00%
▷ Anonymous functions15.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
No PNG files were detected