10% cbnet-social-menu

Code Review | cbnet Social Menu

WordPress plugin cbnet Social Menu scored10%from 54 tests.

About plugin

  • Plugin page: cbnet-social-menu
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.5
  • WordPress version: 6.3.1
  • First release: Feb 11, 2014
  • Latest release: Apr 13, 2016
  • Number of updates: 7
  • Update frequency: every 113.3 days
  • Top authors: chipbennett (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /2,648 total downloads


Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/cbnet-social-menu/cbnet-social-menu.php+106
    Methods with the same name as their class will not be constructors in a future version of PHP; cbnet_social_menu_widget has a deprecated constructor

Server metrics [RAM: ▼1.92MB] [CPU: ▼58.71ms] Passed 4 tests

An overview of server-side resources used by cbnet Social Menu
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.384.58 ▼31.66
Dashboard /wp-admin2.11 ▼1.245.77 ▼55.63
Posts /wp-admin/edit.php2.11 ▼1.255.58 ▼44.69
Add New Post /wp-admin/post-new.php2.11 ▼3.786.85 ▼102.87
Media Library /wp-admin/upload.php2.11 ▼1.135.54 ▼27.83

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 42 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for cbnet Social Menu
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.35 ▼1.301.69 ▼0.0840.18 ▼0.86
Dashboard /wp-admin2,209 ▲185.86 ▲0.97106.98 ▼1.8841.65 ▼4.27
Posts /wp-admin/edit.php2,089 ▼32.01 ▲0.0139.40 ▼2.8035.07 ▼0.33
Add New Post /wp-admin/post-new.php1,519 ▼1423.27 ▼0.09590.67 ▼25.7458.40 ▲7.94
Media Library /wp-admin/upload.php1,382 ▼94.19 ▼0.0793.25 ▼6.9540.78 ▼0.31

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/cbnet-social-menu/cbnet-social-menu.php+106
    Methods with the same name as their class will not be constructors in a future version of PHP; cbnet_social_menu_widget has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_cbnet_social_menu_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
Please fix the following
  • 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/cbnet-social-menu/cbnet-social-menu.php:45

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: social, social networks, menu, widget, cbnet...

cbnet-social-menu/cbnet-social-menu.php Passed 13 tests

The main PHP script in "cbnet Social Menu" version 1.0 is automatically included on every request by WordPress
83 characters long description:
Manage and display your social network profile links using a custom navigation menu

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
Everything looks great! No dangerous files found in this plugin4,992 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PO File1478532

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions7100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin