84% social-subscribe-box

Code Review | Social Subscribe Box

WordPress plugin Social Subscribe Box scored84%from 54 tests.

About plugin

  • Plugin page: social-subscribe-box
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.3.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7.0
  • WordPress version: 6.3.1
  • First release: Jul 9, 2018
  • Latest release: Mar 20, 2021
  • Number of updates: 4
  • Update frequency: every 252.3 days
  • Top authors: sbrajesh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /746 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.19MB] [CPU: ▼5.54ms] Passed 4 tests

A check of server-side resources used by Social Subscribe Box
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1947.71 ▼0.70
Dashboard /wp-admin3.49 ▲0.1949.25 ▼11.33
Posts /wp-admin/edit.php3.60 ▲0.2550.19 ▼5.71
Add New Post /wp-admin/post-new.php6.09 ▲0.2099.37 ▼4.42
Media Library /wp-admin/upload.php3.41 ▲0.1842.41 ▲0.44
Social Subscribe Box /wp-admin/options-general.php?page=pt-social-subscribe-box-settings3.5337.23

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 59 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
ptssbox_settings
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Social Subscribe Box
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,092 ▲33113.87 ▼0.7314.47 ▲12.7447.60 ▲4.76
Dashboard /wp-admin2,199 ▲195.58 ▼0.0889.99 ▼11.7142.94 ▼2.52
Posts /wp-admin/edit.php2,107 ▲101.94 ▼0.0441.46 ▲5.4237.50 ▲3.59
Add New Post /wp-admin/post-new.php1,529 ▲323.71 ▲0.83649.52 ▼34.4053.85 ▼7.06
Media Library /wp-admin/upload.php1,404 ▲44.21 ▲0.1195.99 ▼15.0043.14 ▼3.28
Social Subscribe Box /wp-admin/options-general.php?page=pt-social-subscribe-box-settings1,1011.8833.9334.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • ptssbox_settings

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 | 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 fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/social-subscribe-box/assets/social-subscribe-box-form.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
Please fix the following attributes: You can look at the official readme.txt

social-subscribe-box/social-subscribe-box.php Passed 13 tests

The main PHP script in "Social Subscribe Box" version 1.0.0 is automatically included on every request by WordPress
92 characters long description:
Easy MailChimp subscription with social follow buttons for Facebook, Twitter, LinkedIn and .

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin3,142 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP226831,3021,893
JavaScript6173180632
Markdown31010226
PO File18692209
CSS21913182

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity10.06
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods155
▷ Static methods63.87%
▷ Public methods13889.03%
▷ Protected methods00.00%
▷ Private methods1710.97%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
19 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icons/fun/pt-fun-12.png0.86KB0.83KB▼ 2.84%
assets/icons/error/pt-err-4.png0.83KB0.83KB0.00%
assets/icons/error/pt-err-5.png0.98KB0.98KB0.00%
assets/icons/fun/pt-fun-6.png1.24KB1.25KB0.00%
assets/icons/fun/pt-fun-4.png0.95KB0.94KB▼ 0.93%