84% wp-posted-display

Code Review | WordPress Posted Display

WordPress plugin WordPress Posted Display scored84%from 54 tests.

About plugin

  • Plugin page: wp-posted-display
  • Plugin version: 2.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-5.6.1
  • WordPress version: 6.3.1
  • First release: Nov 16, 2015
  • Latest release: Feb 14, 2021
  • Number of updates: 92
  • Update frequency: every 20.9 days
  • Top authors: miiitaka (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /5,887 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
Install script ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼5.46ms] Passed 4 tests

Analyzing server-side resources used by WordPress Posted Display
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1353.43 ▲9.24
Dashboard /wp-admin3.45 ▲0.1551.62 ▼7.61
Posts /wp-admin/edit.php3.56 ▲0.2157.53 ▲0.02
Add New Post /wp-admin/post-new.php6.03 ▲0.1489.13 ▼17.38
Media Library /wp-admin/upload.php3.37 ▲0.1441.33 ▲3.12
All Settings /wp-admin/admin.php?page=wp-posted-display/wp-posted-display.php3.3636.71
Add New /wp-admin/admin.php?page=wp-posted-display/includes/wp-posted-display-admin-post.php3.4341.01

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 18 new files
Database: 1 new table, 7 new options
New tables
wp_posted_display
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
widget_posted_display_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by WordPress Posted Display
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲8014.63 ▲0.271.88 ▼0.0143.39 ▲0.51
Dashboard /wp-admin2,225 ▲455.66 ▼0.0285.09 ▼4.4439.52 ▼1.00
Posts /wp-admin/edit.php2,127 ▲271.99 ▲0.0238.00 ▼2.0834.91 ▼6.94
Add New Post /wp-admin/post-new.php1,550 ▲2223.26 ▲0.14698.23 ▲23.3061.57 ▲6.18
Media Library /wp-admin/upload.php1,427 ▲304.24 ▲0.02101.15 ▼8.8845.08 ▼1.02
All Settings /wp-admin/admin.php?page=wp-posted-display/wp-posted-display.php8052.0124.2925.71
Add New /wp-admin/admin.php?page=wp-posted-display/includes/wp-posted-display-admin-post.php1,2153.2747.5132.35

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

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
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-posted-display/includes/wp-posted-display-admin-widget.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-posted-display/wp-posted-display.php:13

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 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (Create an HTML template to be output in the Widget.), #2 ("Posted Display" has been added to the Widget. Display to select the template you created.)
The official readme.txt is a good inspiration

wp-posted-display/wp-posted-display.php Passed 13 tests

The main PHP script in "WordPress Posted Display" version 2.5.0 is automatically included on every request by WordPress
109 characters long description:
Plug-in Posted Display Widget & ShortCode Add. You can also save and display your browsing history to Cookie.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,119 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP7178539903
PO File14248101
JavaScript391568
CSS21247

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity19.57
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods48
▷ Static methods00.00%
▷ Public methods3572.92%
▷ Protected methods00.00%
▷ Private methods1327.08%
Functions0
▷ Named functions00.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
2 PNG files occupy 0.13MB with 0.09MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png98.09KB30.75KB▼ 68.65%
screenshot-2.png33.83KB11.67KB▼ 65.52%