84% wp-heading-buttons

Code Review | WP Heading Buttons

WordPress plugin WP Heading Buttons scored84%from 54 tests.

About plugin

  • Plugin page: wp-heading-buttons
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.4
  • WordPress version: 6.3.1
  • First release: Apr 4, 2013
  • Latest release: Dec 26, 2015
  • Number of updates: 13
  • Update frequency: every 76.6 days
  • Top authors: tercan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /5,307 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.01MB] [CPU: ▼4.33ms] Passed 4 tests

An overview of server-side resources used by WP Heading Buttons
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0142.39 ▼2.48
Dashboard /wp-admin3.32 ▲0.0151.46 ▼2.35
Posts /wp-admin/edit.php3.37 ▲0.0152.64 ▼4.58
Add New Post /wp-admin/post-new.php5.90 ▲0.0196.65 ▼7.91
Media Library /wp-admin/upload.php3.24 ▲0.0137.68 ▼0.30

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by WP Heading Buttons
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.72 ▲0.341.96 ▲0.1242.41 ▲3.95
Dashboard /wp-admin2,198 ▲245.64 ▲0.0488.91 ▼13.7540.68 ▼9.65
Posts /wp-admin/edit.php2,103 ▼02.00 ▲0.0140.33 ▼1.1339.93 ▲0.75
Add New Post /wp-admin/post-new.php1,529 ▲323.40 ▲0.34638.08 ▼60.1346.84 ▼10.65
Media Library /wp-admin/upload.php1,406 ▲94.14 ▼0.11104.72 ▼15.9248.30 ▼2.23

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please 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 plugin_dir_url() in wp-content/plugins/wp-heading-buttons/wp-heading-buttons.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: heading buttons, visual editor, tinymce buttons

wp-heading-buttons/wp-heading-buttons.php Passed 13 tests

"WP Heading Buttons" version 0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
66 characters long description:
Adding heading buttons (H1, H2, H3, H4, H5, H6) to TinyMCE editor.

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 detected133 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript65099
PHP18934

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/heading-buttons.png1.56KB0.39KB▼ 74.78%