84% style-buddy

Code Review | Style Buddy

WordPress plugin Style Buddy scored84%from 54 tests.

About plugin

  • Plugin page: style-buddy
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.9.0
  • WordPress version: 6.3.1
  • First release: Apr 14, 2014
  • Latest release: Apr 29, 2014
  • Number of updates: 9
  • Update frequency: every 1.7 days
  • Top authors: jprummer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,903 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.12MB] [CPU: ▼3.52ms] Passed 4 tests

Analyzing server-side resources used by Style Buddy
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1156.08 ▲12.62
Dashboard /wp-admin3.41 ▲0.1147.14 ▼6.69
Posts /wp-admin/edit.php3.53 ▲0.1746.89 ▲0.03
Add New Post /wp-admin/post-new.php6.04 ▲0.1590.45 ▼3.27
Media Library /wp-admin/upload.php3.34 ▲0.1033.49 ▼4.16
Style Buddy /wp-admin/options-general.php?page=stylebuddy_options_page3.3029.44

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Style Buddy
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.25 ▼1.411.73 ▼0.5437.47 ▼13.56
Dashboard /wp-admin2,207 ▲195.03 ▼0.87104.75 ▼11.0238.33 ▼6.26
Posts /wp-admin/edit.php2,093 ▲72.00 ▼0.0137.31 ▼1.4738.02 ▼2.91
Add New Post /wp-admin/post-new.php6,286 ▲4,74226.00 ▲7.55891.46 ▲260.5558.66 ▲2.12
Media Library /wp-admin/upload.php1,395 ▲74.22 ▼0.00102.90 ▼4.5342.39 ▼0.03
Style Buddy /wp-admin/options-general.php?page=stylebuddy_options_page9341.8427.1528.94

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 7 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • stylebuddy
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/style-buddy/style-buddy.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: css, load css, page, load javascript, javascript

style-buddy/style-buddy.php Passed 13 tests

The main file in "Style Buddy" v. 1.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
134 characters long description:
Add custom css and javascript to a page via the WordPress administration panel. Code is only loaded on the page to which it was added.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin525 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2106115525

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity42.00
▷ Minimum class complexity26.00
▷ Maximum class complexity58.00
Average method complexity4.57
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin