84% page-presentation-shortcode

Code Review | Page Presentation Shortcode

WordPress plugin Page Presentation Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: page-presentation...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-4.4.2
  • WordPress version: 6.3.1
  • First release: May 25, 2016
  • Latest release: May 25, 2016
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: alineainteractive (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /782 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.02MB] [CPU: ▼4.23ms] Passed 4 tests

A check of server-side resources used by Page Presentation Shortcode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.93 ▼6.94
Dashboard /wp-admin3.32 ▲0.0246.24 ▼5.96
Posts /wp-admin/edit.php3.37 ▲0.0244.89 ▼3.67
Add New Post /wp-admin/post-new.php5.90 ▲0.0296.20 ▼0.36
Media Library /wp-admin/upload.php3.24 ▲0.0236.19 ▲3.27

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Page Presentation Shortcode: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.26 ▼1.361.58 ▼0.3742.49 ▼10.17
Dashboard /wp-admin2,203 ▲154.84 ▼1.07107.24 ▼8.1938.44 ▼6.99
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0035.99 ▼2.2435.41 ▲1.13
Add New Post /wp-admin/post-new.php1,538 ▲223.35 ▲0.12654.54 ▲20.7151.24 ▼5.61
Media Library /wp-admin/upload.php1,385 ▼34.17 ▼0.0294.66 ▼5.8442.31 ▼0.48

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/page-presentation-shortcode/plugin.php:41

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 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:
  • Donate link: Invalid url: ""
You can look at the official readme.txt

page-presentation-shortcode/plugin.php 92% from 13 tests

The principal PHP file in "Page Presentation Shortcode" v. 1.1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("page-presentation-shortcode.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin78 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1333578

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code1.00
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected