84% svegliat-buttons

Code Review | SvegliaT Buttons

WordPress plugin SvegliaT Buttons scored 84% from 54 tests.

About plugin

  • Plugin page: svegliat-buttons
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Dec 14, 2012
  • Latest release: Nov 27, 2016
  • Number of updates: 71
  • Update frequency: every 20.3 days
  • Top authors: svegliadesign (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

500+ active / 12,674 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.16ms] Passed 4 tests

An overview of server-side resources used by SvegliaT Buttons
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0639.65 ▼3.25
Dashboard /wp-admin3.36 ▲0.0645.99 ▼3.31
Posts /wp-admin/edit.php3.47 ▲0.1243.78 ▼2.05
Add New Post /wp-admin/post-new.php5.94 ▲0.0686.82 ▲0.22
Media Library /wp-admin/upload.php3.28 ▲0.0531.36 ▼4.01

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for SvegliaT Buttons
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲8214.55 ▲0.311.78 ▲0.1645.25 ▲0.52
Dashboard /wp-admin2,224 ▲365.86 ▲0.96109.81 ▲6.9983.31 ▲40.53
Posts /wp-admin/edit.php2,104 ▲151.98 ▼0.0134.67 ▼2.5932.83 ▲0.85
Add New Post /wp-admin/post-new.php1,536 ▲1723.43 ▲0.09691.64 ▼21.9153.50 ▲0.81
Media Library /wp-admin/upload.php1,406 ▲214.17 ▼0.01100.06 ▼7.5846.66 ▲4.43

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/svegliat-buttons/svegliat-buttons.php:209

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 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (This is an example of the buttons inside your blogpost), #2 (This is an example of the button inside your blogpost)
Please take inspiration from this readme.txt

svegliat-buttons/svegliat-buttons.php Passed 13 tests

This is the main PHP file of "SvegliaT Buttons" version 1.3.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
72 characters long description:
Add a shortcode in your wordpress to visualize nice and colored buttons.

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 detected1,171 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS19820667
PHP111741405
JavaScript11199

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 problems
Cyclomatic complexity
Average complexity per logical line of code0.06
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%
Functions27
▷ Named functions27100.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
7 PNG files occupy 0.23MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png50.15KB18.96KB▼ 62.19%
admin-images/button-editor.png61.65KB20.15KB▼ 67.32%
admin-images/menu_icon.png0.72KB0.57KB▼ 20.98%
admin-images/caffe.png22.37KB8.86KB▼ 60.41%
screenshot-2.png5.29KB2.99KB▼ 43.49%