74% post-display

Code Review | Post Display

WordPress plugin Post Display scored74%from 54 tests.

About plugin

  • Plugin page: post-display
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3.1
  • WordPress version: 6.3.1
  • First release: Nov 27, 2015
  • Latest release: Nov 27, 2015
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: tuyennv (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /1,916 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.93ms] Passed 4 tests

An overview of server-side resources used by Post Display
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1042.79 ▲2.81
Dashboard /wp-admin3.39 ▲0.0545.80 ▼15.81
Posts /wp-admin/edit.php3.51 ▲0.1546.53 ▲1.07
Add New Post /wp-admin/post-new.php5.97 ▲0.0981.43 ▼11.71
Media Library /wp-admin/upload.php3.32 ▲0.0938.02 ▲2.74
Post Display /wp-admin/admin.php?page=tzpost-display3.4539.80

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 22 new files
Database: 2 new tables, 9 new options
New tables
wp_tzpost_thumbnail
wp_tzpost_optionset
New WordPress options
tzpostsmethod1
theysaidso_admin_options
widget_theysaidso_widget
tzpostsmethod2
widget_recent-posts
db_upgraded
tzpostsmethod3
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post Display
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲15613.95 ▼0.429.38 ▲7.3642.07 ▼1.13
Dashboard /wp-admin2,221 ▲335.79 ▼0.01102.86 ▼14.9274.50 ▲29.58
Posts /wp-admin/edit.php2,104 ▲121.97 ▼0.0236.25 ▼0.8332.65 ▲0.04
Add New Post /wp-admin/post-new.php1,527 ▼623.38 ▲0.43814.66 ▲145.5762.77 ▲10.40
Media Library /wp-admin/upload.php1,400 ▲154.18 ▼0.1495.55 ▼18.3469.47 ▲21.59
Post Display /wp-admin/admin.php?page=tzpost-display1,7202.0129.5831.62

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie tables detected upon uninstall: 2 tables
    • wp_tzpost_optionset
    • wp_tzpost_thumbnail
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_recent-posts
    • tzpostsmethod2
    • db_upgraded
    • tzpostsmethod3
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • tzpostsmethod1
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function tzpost_plugin_get_version() in wp-content/plugins/post-display/templates/template-default.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/post-display/post-display.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Add New.), #2 (Post options.), #3 (Use Shortcode.)
You can take inspiration from this readme.txt

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

Analyzing the main PHP file in "Post Display" version 1.0.0
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 177 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected1,644 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP7134811,158
CSS351271
JavaScript2296215

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity31.00
▷ Minimum class complexity31.00
▷ Maximum class complexity31.00
Average method complexity7.00
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods360.00%
▷ Protected methods00.00%
▷ Private methods240.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/down.png2.77KB0.11KB▼ 95.95%
images/tzsidebar.png0.23KB0.26KB0.00%
images/up.png2.79KB0.11KB▼ 95.94%
images/upb.png0.96KB0.11KB▼ 88.15%
images/controls.png2.74KB1.42KB▼ 48.29%