84% display-a-post

Code Review | Display A Post

WordPress plugin Display A Post scored84%from 54 tests.

About plugin

  • Plugin page: display-a-post
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Sep 19, 2015
  • Latest release: Sep 22, 2015
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: jd7777 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,205 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Display A Post
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.39 ▼2.78
Dashboard /wp-admin3.31 ▲0.0046.25 ▼0.35
Posts /wp-admin/edit.php3.36 ▲0.0048.06 ▲2.68
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.60 ▲3.79
Media Library /wp-admin/upload.php3.23 ▲0.0035.19 ▲0.21

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Display A Post
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.17 ▼1.581.77 ▼0.3041.08 ▼8.05
Dashboard /wp-admin2,203 ▲124.86 ▼1.04111.17 ▲3.9041.20 ▼2.38
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0541.85 ▼1.2134.53 ▼1.05
Add New Post /wp-admin/post-new.php1,533 ▼023.11 ▼0.06588.97 ▼103.3555.20 ▼5.18
Media Library /wp-admin/upload.php1,391 ▼04.23 ▲0.0397.43 ▼5.3943.54 ▼0.23

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • 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)
Even though no errors were found, this is by no means 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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/display-a-post/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 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
5 plugin tags: get, display, get post, post, display post

display-a-post/index.php 85% from 13 tests

The main PHP script in "Display A Post" version 1.1 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("display-a-post.php" instead of "index.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 200 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin43 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1131043

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.53
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected