10% sidepost

Code Review | SidePost

WordPress plugin SidePost scored10%from 54 tests.

About plugin

  • Plugin page: sidepost
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.5.2
  • WordPress version: 6.3.1
  • First release: Aug 15, 2015
  • Latest release: Jun 16, 2016
  • Number of updates: 16
  • Update frequency: every 19.1 days
  • Top authors: webmaric (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /1,674 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/sidepost/zmsrp.php+36
    Methods with the same name as their class will not be constructors in a future version of PHP; srp_plugin has a deprecated constructor

Server metrics [RAM: ▼1.85MB] [CPU: ▼58.33ms] Passed 4 tests

A check of server-side resources used by SidePost
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.13 ▼1.335.74 ▼40.27
Dashboard /wp-admin2.15 ▼1.156.49 ▼48.37
Posts /wp-admin/edit.php2.15 ▼1.208.09 ▼48.24
Add New Post /wp-admin/post-new.php2.15 ▼3.736.50 ▼96.42
Media Library /wp-admin/upload.php2.15 ▼1.075.29 ▼34.64

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_srp_plugin
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for SidePost
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲2214.22 ▲0.081.57 ▼0.2643.44 ▼0.03
Dashboard /wp-admin2,197 ▲205.65 ▲0.0191.25 ▲3.2737.72 ▼5.49
Posts /wp-admin/edit.php2,102 ▼11.98 ▲0.0239.09 ▼3.5534.58 ▼2.61
Add New Post /wp-admin/post-new.php1,530 ▼723.06 ▲4.68599.50 ▼12.3850.15 ▼13.15
Media Library /wp-admin/upload.php1,405 ▲54.21 ▼0.0293.88 ▼12.0043.92 ▼5.55

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/sidepost/zmsrp.php+36
    Methods with the same name as their class will not be constructors in a future version of PHP; srp_plugin has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_srp_plugin
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sidepost/zmsrp.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: sidebar, news, categories, simple, thumbnails...

sidepost/zmsrp.php 92% from 13 tests

The principal PHP file in "SidePost" v. 1.0.7 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("sidepost.php" instead of "zmsrp.php")

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 detected163 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2522142
CSS20021

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png106.45KB41.07KB▼ 61.42%