84% listposts-shortcode

Code Review | ListPosts Shortcode

WordPress plugin ListPosts Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: listposts-shortcode
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9.1
  • WordPress version: 6.3.1
  • First release: Oct 4, 2013
  • Latest release: Jun 10, 2014
  • Number of updates: 5
  • Update frequency: every 49.8 days
  • Top authors: dougwalker619 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,800 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Analyzing server-side resources used by ListPosts Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0233.78 ▼9.16
Dashboard /wp-admin3.32 ▲0.0247.77 ▼0.80
Posts /wp-admin/edit.php3.38 ▲0.0239.92 ▼3.85
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.04 ▼16.07
Media Library /wp-admin/upload.php3.25 ▲0.0233.38 ▼2.47

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for ListPosts Shortcode
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲4314.61 ▲0.051.90 ▲0.0343.76 ▲4.02
Dashboard /wp-admin2,195 ▲185.56 ▼0.0287.22 ▼1.1437.77 ▼2.77
Posts /wp-admin/edit.php2,100 ▼01.98 ▲0.0134.82 ▼2.1631.12 ▼6.69
Add New Post /wp-admin/post-new.php1,531 ▲522.89 ▼0.61594.40 ▼111.0655.81 ▼16.50
Media Library /wp-admin/upload.php1,403 ▲64.20 ▼0.01100.11 ▲5.3342.35 ▼0.05

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/listposts-shortcode/listposts.php:133

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 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (Front-end default design.) image missing
Please take inspiration from this readme.txt

listposts-shortcode/listposts.php 92% from 13 tests

This is the main PHP file of "ListPosts Shortcode" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("listposts-shortcode.php" instead of "listposts.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected100 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11124100

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
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
There were not PNG files found in your plugin