84% wpb-social-master

Code Review | WPB Social Master

WordPress plugin WPB Social Master scored 84% from 54 tests.

About plugin

  • Plugin page: wpb-social-master
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.9
  • WordPress version: 5.8.1
  • First release: May 16, 2014
  • Latest release: Mar 11, 2015
  • Number of updates: 13
  • Update frequency: every 23.0 days
  • Top authors: wpbean (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active / 3,453 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Analyzing server-side resources used by WPB Social Master
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1332.86 ▲11.98
Dashboard /wp-admin3.11 ▲0.0641.04 ▲0.73
Posts /wp-admin/edit.php3.22 ▲0.1240.93 ▼2.24
Add New Post /wp-admin/post-new.php5.48 ▲0.0587.58 ▼555.49
Media Library /wp-admin/upload.php3.05 ▲0.0534.17 ▼4.82
WPB Social Master /wp-admin/options-general.php?page=wpb_social_master3.0329.56

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 3 new options
New WordPress options
wpb_style
wpb_follow
wpb_profile

Browser metrics Passed 4 tests

WPB Social Master: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,847 ▲24116.94 ▲1.4312.92 ▲5.1045.54 ▼4.74
Dashboard /wp-admin3,007 ▲766.53 ▲0.38132.62 ▼6.56112.45 ▲17.98
Posts /wp-admin/edit.php2,795 ▲563.02 ▲0.3368.47 ▲7.49104.16 ▲18.12
Add New Post /wp-admin/post-new.php1,711 ▼16118.20 ▼0.96345.46 ▼34.27127.03 ▲19.54
Media Library /wp-admin/upload.php1,854 ▲475.18 ▲0.17122.89 ▼23.82120.25 ▼2.29
WPB Social Master /wp-admin/options-general.php?page=wpb_social_master2,0463.2496.7479.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 3 options
    • wpb_follow
    • wpb_style
    • wpb_profile

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpb-social-master/main.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpb-social-master/class.settings-api.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: social network, facebook social, social, social share, social media

wpb-social-master/main.php 85% from 13 tests

The main file in "WPB Social Master" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wpb-social-master.php" instead of "main.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 653 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,025 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP3136182605
SVG100414
CSS1003
JavaScript2003

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity23.50
▷ Minimum class complexity3.00
▷ Maximum class complexity44.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.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
1 PNG file occupies 0.11MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/social-sprite.png110.61KB49.95KB▼ 54.84%