83% wp-super-network

Code Review | WP Super Network

WordPress plugin WP Super Network scored83%from 54 tests.

About plugin

  • Plugin page: wp-super-network
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Nov 21, 2019
  • Latest release: Feb 13, 2023
  • Number of updates: 13
  • Update frequency: every 90.9 days
  • Top authors: manfcarlo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /939 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.27ms] Passed 4 tests

A check of server-side resources used by WP Super Network
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.0043.74 ▼3.77
Dashboard /wp-admin3.57 ▲0.0053.44 ▲1.56
Posts /wp-admin/edit.php3.68 ▲0.0051.61 ▼3.30
Add New Post /wp-admin/post-new.php6.15 ▲0.00101.19 ▲2.11
Media Library /wp-admin/upload.php3.49 ▲0.0037.75 ▲0.44

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 199 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Super Network
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.26 ▼0.012.11 ▲0.3041.33 ▼3.44
Dashboard /wp-admin2,195 ▲185.66 ▼0.0991.84 ▲1.4742.77 ▼0.14
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0040.74 ▲1.9334.62 ▼0.53
Add New Post /wp-admin/post-new.php1,545 ▲1423.17 ▼0.20616.71 ▼89.6548.46 ▼2.12
Media Library /wp-admin/upload.php1,397 ▼04.19 ▼0.11106.78 ▲2.6041.69 ▼4.27

Uninstaller [IO: ▲0.00MB] [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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 157× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPSQLParser\\processors\\AbstractProcessor' not found in wp-content/plugins/wp-super-network/vendor/greenlion/php-sql-parser/src/PHPSQLParser/processors/ColumnDefinitionProcessor.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'PHPSQLParser\\processors\\AbstractProcessor' not found in wp-content/plugins/wp-super-network/vendor/greenlion/php-sql-parser/src/PHPSQLParser/processors/LimitProcessor.php:51
    • > PHP Fatal error
      Uncaught Error: Interface 'PHPSQLParser\\builders\\Builder' not found in wp-content/plugins/wp-super-network/vendor/greenlion/php-sql-parser/src/PHPSQLParser/builders/GroupByAliasBuilder.php:53
    • > PHP Fatal error
      Uncaught Error: Interface 'PHPSQLParser\\builders\\Builder' not found in wp-content/plugins/wp-super-network/vendor/greenlion/php-sql-parser/src/PHPSQLParser/builders/LimitBuilder.php:53
    • > PHP Fatal error
      Uncaught Error: Interface 'PHPSQLParser\\builders\\Builder' not found in wp-content/plugins/wp-super-network/vendor/greenlion/php-sql-parser/src/PHPSQLParser/builders/CreateBuilder.php:53
    • > PHP Fatal error
      Uncaught Error: Interface 'PHPSQLParser\\builders\\Builder' not found in wp-content/plugins/wp-super-network/vendor/greenlion/php-sql-parser/src/PHPSQLParser/builders/AliasBuilder.php:52
    • > PHP Fatal error
      Uncaught Error: Class 'PHPSQLParser\\builders\\WhereExpressionBuilder' not found in wp-content/plugins/wp-super-network/vendor/greenlion/php-sql-parser/src/PHPSQLParser/builders/OrderByExpressionBuilder.php:53
    • > PHP Fatal error
      Uncaught Error: Interface 'PHPSQLParser\\builders\\Builder' not found in wp-content/plugins/wp-super-network/vendor/greenlion/php-sql-parser/src/PHPSQLParser/builders/InsertBuilder.php:53
    • > PHP Fatal error
      Uncaught Error: Class 'PHPSQLParser\\processors\\AbstractProcessor' not found in wp-content/plugins/wp-super-network/vendor/greenlion/php-sql-parser/src/PHPSQLParser/processors/DefaultProcessor.php:51
    • > PHP Fatal error
      Uncaught Error: Interface 'PHPSQLParser\\builders\\Builder' not found in wp-content/plugins/wp-super-network/vendor/greenlion/php-sql-parser/src/PHPSQLParser/builders/SetBuilder.php:53

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt is a good inspiration

wp-super-network/wp-super-network.php 92% from 13 tests

Analyzing the main PHP file in "WP Super Network" version 1.2.0
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected11,105 lines of code in 196 files:
LanguageFilesBlank linesComment linesLines of code
PHP1942,5068,88211,019
JSON10069
JavaScript14017

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 160)
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity11.68
▷ Minimum class complexity1.00
▷ Maximum class complexity160.00
Average method complexity3.69
▷ Minimum method complexity1.00
▷ Maximum method complexity160.00
Code structure
Namespaces10
Interfaces1
Traits0
Classes185
▷ Abstract classes10.54%
▷ Concrete classes18499.46%
▷ Final classes10.54%
Methods741
▷ Static methods202.70%
▷ Public methods34446.42%
▷ Protected methods38351.69%
▷ Private methods141.89%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants89
▷ Global constants22.25%
▷ Class constants8797.75%
▷ Public constants87100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected