83% sideoffer

Code Review | SideOffer

WordPress plugin SideOffer scored83%from 54 tests.

About plugin

  • Plugin page: sideoffer
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4.1
  • WordPress version: 6.3.1
  • First release: Aug 13, 2012
  • Latest release: Aug 20, 2012
  • Number of updates: 33
  • Update frequency: every 0.2 days
  • Top authors: HeavyDigital (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active /16,133 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 successfully, without throwing any errors or notices

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

An overview of server-side resources used by SideOffer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0439.36 ▼0.92
Dashboard /wp-admin3.33 ▲0.0243.72 ▼4.87
Posts /wp-admin/edit.php3.38 ▲0.0245.30 ▲0.12
Add New Post /wp-admin/post-new.php5.91 ▲0.0298.38 ▲15.06
Media Library /wp-admin/upload.php3.25 ▲0.0236.91 ▲3.31

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 17 new options
New WordPress options
hd_sideoffer_top
hd_sideoffer_in
hd_sideoffer_content
hd_sideoffer_out
hd_sideoffer_color_text
hd_sideoffer_title
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
hd_sideoffer_mode
...

Browser metrics Passed 4 tests

Checking browser requirements for SideOffer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,923 ▲16213.45 ▼1.028.39 ▲6.5142.97 ▼3.21
Dashboard /wp-admin2,221 ▲435.71 ▲0.0782.29 ▼33.3472.67 ▲25.42
Posts /wp-admin/edit.php2,140 ▲432.24 ▲0.3037.57 ▲1.0035.74 ▲0.46
Add New Post /wp-admin/post-new.php1,711 ▲18024.18 ▲1.00692.41 ▼5.2657.27 ▲2.39
Media Library /wp-admin/upload.php1,433 ▲364.28 ▲0.05102.42 ▼17.5681.20 ▲35.72

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

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
Even though no errors were found, 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
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sideoffer/sideoffer-options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sideoffer/sideoffer-options.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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 your attention:
  • Screenshots: These screenshots do not have images: #1 (SideOffer UI Side Tab (Live on HeavyDigital.net)), #2 (SideOffer Configuration Options)
  • Tags: You are using too many tags: 36 tag instead of maximum 10
The official readme.txt is a good inspiration

sideoffer/sideoffer.php 92% from 13 tests

The main PHP file in "SideOffer" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 581 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected340 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP26039340

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.08
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
7 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-hd.png1.73KB0.70KB▼ 59.33%
images/icon-wordpress.png3.59KB0.97KB▼ 73.13%
images/icon-trac.png1.17KB0.30KB▼ 74.23%
images/sideoffer-bg.png5.59KB4.15KB▼ 25.72%
images/logo-heavydigital-200x75.png21.22KB7.27KB▼ 65.74%