83% simple-buttons-creator

Code Review | Simple Buttons Creator

WordPress plugin Simple Buttons Creator scored 83% from 54 tests.

About plugin

  • Plugin page: simple-buttons-cr...
  • Plugin version: 1.04
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.2-4.2.4
  • WordPress version: 6.3.1
  • First release: Sep 25, 2014
  • Latest release: Aug 15, 2015
  • Number of updates: 32
  • Update frequency: every 10.2 days
  • Top authors: robbychen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 3,929 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼3.50ms] Passed 4 tests

Analyzing server-side resources used by Simple Buttons Creator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0540.73 ▼7.41
Dashboard /wp-admin3.37 ▲0.0744.28 ▼1.62
Posts /wp-admin/edit.php3.48 ▲0.1348.04 ▲1.93
Add New Post /wp-admin/post-new.php5.97 ▲0.0885.57 ▼6.32
Media Library /wp-admin/upload.php3.29 ▲0.0636.36 ▲1.37
Add New Button /wp-admin/admin.php?page=sbc-new3.2833.03
Simple Buttons Creator /wp-admin/admin.php?page=simple-buttons3.2730.68

Server storage [IO: ▲0.73MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Please fix the following
  • The plugin illegally modified 1 file (12.00KB) outside of "wp-content/plugins/simple-buttons-creator/" and "wp-content/uploads/"
    • (new file) wp-content/data/sbc.sqlite
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_sbc_widget
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Simple Buttons Creator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲6413.16 ▼1.451.55 ▼0.4940.44 ▼3.37
Dashboard /wp-admin2,242 ▲515.86 ▲0.9494.64 ▼11.1270.02 ▲27.92
Posts /wp-admin/edit.php2,122 ▲332.05 ▼0.0933.97 ▼3.1333.32 ▼1.24
Add New Post /wp-admin/post-new.php1,557 ▲3718.42 ▼4.80747.37 ▲159.4860.67 ▼0.83
Media Library /wp-admin/upload.php1,412 ▲244.25 ▲0.05106.51 ▲11.5777.21 ▲32.76
Add New Button /wp-admin/admin.php?page=sbc-new1,2172.3156.3925.09
Simple Buttons Creator /wp-admin/admin.php?page=simple-buttons8621.9835.6824.00

Uninstaller [IO: ▲0.01MB] [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
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_sbc_widget
    • widget_theysaidso_widget
    • can_compress_scripts

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
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined index: method in wp-content/plugins/simple-buttons-creator/bt-manage.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'sqlite' not found in wp-content/plugins/simple-buttons-creator/pages/new.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-buttons-creator/sbc-widget.php:3
    • > PHP Notice
      Undefined index: method in wp-content/plugins/simple-buttons-creator/bt-manage.php on line 14
    • > PHP Notice
      Undefined index: method in wp-content/plugins/simple-buttons-creator/bt-manage.php on line 4
    • > PHP Notice
      Undefined index: method in wp-content/plugins/simple-buttons-creator/bt-manage.php on line 22
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-buttons-creator/sbc-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'sqlite' not found in wp-content/plugins/simple-buttons-creator/pages/index.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
3 plugin tags: widget, sqlite, button

simple-buttons-creator/sbc.php 85% from 13 tests

The main PHP file in "Simple Buttons Creator" ver. 1.04 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 303 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-buttons-creator.php" instead of "sbc.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin618 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP86664427
JavaScript3148117
CSS317574

PHP code Passed 2 tests

A brief analysis 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.28
Average class complexity9.00
▷ Minimum class complexity6.00
▷ Maximum class complexity11.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
9 PNG files occupy 0.69MB with 0.47MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png79.60KB25.31KB▼ 68.21%
screenshot-5.png66.50KB22.31KB▼ 66.46%
screenshot-6.png119.79KB41.72KB▼ 65.17%
screenshot-1.png79.20KB24.30KB▼ 69.32%
screenshot-4.png65.53KB18.40KB▼ 71.92%