84% display-pages-shortcode

Code Review | Display Pages Shortcode

WordPress plugin Display Pages Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: display-pages-sho...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8.1
  • WordPress version: 6.3.1
  • First release: Feb 5, 2014
  • Latest release: Feb 6, 2014
  • Number of updates: 5
  • Update frequency: every 2.0 days
  • Top authors: RustyBadRobot (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /3,466 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.23ms] Passed 4 tests

Server-side resources used by Display Pages Shortcode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0344.14 ▲3.32
Dashboard /wp-admin3.34 ▲0.0352.55 ▲0.43
Posts /wp-admin/edit.php3.39 ▲0.0348.03 ▼5.05
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.89 ▼6.57
Media Library /wp-admin/upload.php3.26 ▲0.0335.56 ▼5.73

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Display Pages Shortcode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.44 ▲0.231.73 ▼0.6241.92 ▼0.42
Dashboard /wp-admin2,189 ▲155.52 ▼0.0485.46 ▼20.9439.08 ▼3.64
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0132.99 ▼5.5935.52 ▲1.04
Add New Post /wp-admin/post-new.php1,526 ▼023.22 ▲0.17607.07 ▼86.0340.64 ▼23.41
Media Library /wp-admin/upload.php1,394 ▼94.09 ▼0.10100.46 ▼0.6844.71 ▼0.78

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • 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 everything seems fine, this is not 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/display-pages-shortcode/display-pages-shortcode.php:90

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: page, columns, shortcode, posts, pages...

display-pages-shortcode/display-pages-shortcode.php Passed 13 tests

"Display Pages Shortcode" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
62 characters long description:
Display a listing of pages using the [display-pages] shortcode

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
No dangerous file extensions were detected198 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP131059183
CSS16515

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
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%
Functions3
▷ Named functions3100.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