83% sticky-for-siteorigin

Code Review | Sticky for SiteOrigin

WordPress plugin Sticky for SiteOrigin scored83%from 54 tests.

About plugin

  • Plugin page: sticky-for-siteor...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.7
  • WordPress version: 6.3.1
  • First release: Mar 26, 2017
  • Latest release: May 9, 2017
  • Number of updates: 3
  • Update frequency: every 14.7 days
  • Top authors: mimothemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /4,057 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼11.61ms] Passed 4 tests

A check of server-side resources used by Sticky for SiteOrigin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0743.00 ▲1.19
Dashboard /wp-admin3.36 ▲0.0249.33 ▼18.49
Posts /wp-admin/edit.php3.48 ▲0.1250.06 ▼2.63
Add New Post /wp-admin/post-new.php5.96 ▲0.0887.07 ▼23.30
Media Library /wp-admin/upload.php3.29 ▲0.0636.86 ▼2.02

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Sticky for SiteOrigin: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲11713.43 ▼1.199.13 ▲7.3941.59 ▲0.32
Dashboard /wp-admin2,199 ▲255.59 ▼0.0894.61 ▼3.7440.21 ▼0.89
Posts /wp-admin/edit.php2,104 ▲12.01 ▲0.0439.01 ▼4.5537.96 ▼0.34
Add New Post /wp-admin/post-new.php1,530 ▼523.26 ▲5.04647.37 ▼5.3855.30 ▼16.47
Media Library /wp-admin/upload.php1,407 ▲74.20 ▲0.0395.84 ▼7.6941.66 ▼3.91

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

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 | 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
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/sticky-for-siteorigin/admin/partials/sticky-siteorigin-admin-display.php
    • > /wp-content/plugins/sticky-for-siteorigin/public/partials/sticky-siteorigin-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === sticky-for-siteorigin === )
You can take inspiration from this readme.txt

sticky-for-siteorigin/sticky-siteorigin.php 85% from 13 tests

The principal PHP file in "Sticky for SiteOrigin" v. 1.0.1 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 ("sticky-for-siteorigin.php" instead of "sticky-siteorigin.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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 detected267 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12143550221
JavaScript3165734
CSS21812

PHP code Passed 2 tests

This is a very shot 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.12
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.27
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods26
▷ Static methods27.69%
▷ Public methods2180.77%
▷ Protected methods00.00%
▷ Private methods519.23%
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