78% grid-social-boxes

Code Review | Grid Social Boxes

WordPress plugin Grid Social Boxes scored78%from 54 tests.

About plugin

  • Plugin page: grid-social-boxes
  • Plugin version: 1.6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.3
  • WordPress version: 6.3.1
  • First release: Feb 14, 2015
  • Latest release: Nov 5, 2020
  • Number of updates: 29
  • Update frequency: every 72.2 days
  • Top authors: EdwardBock (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,360 total downloads

Benchmarks

Plugin footprint 82% 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.59MB] [CPU: ▼0.01ms] Passed 4 tests

A check of server-side resources used by Grid Social Boxes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5938.86 ▼3.80
Dashboard /wp-admin3.89 ▲0.5947.79 ▼3.15
Posts /wp-admin/edit.php3.94 ▲0.5949.72 ▲0.32
Add New Post /wp-admin/post-new.php6.47 ▲0.5994.73 ▲12.21
Media Library /wp-admin/upload.php3.81 ▲0.5837.03 ▲6.59
Grid Social Boxes /wp-admin/options-general.php?page=grid_social_boxes_settings3.7239.31

Server storage [IO: ▲30.16MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
It is recommended to fix the following issues
  • Total filesystem usage should be limited to 25MB (currently using 30.16MB)
Filesystem: 12,102 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Grid Social Boxes: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5913.24 ▼1.061.61 ▼0.3238.37 ▼9.76
Dashboard /wp-admin2,225 ▲405.88 ▲1.0099.92 ▼15.6643.62 ▼1.58
Posts /wp-admin/edit.php2,105 ▲162.00 ▲0.0339.89 ▲2.0635.06 ▲0.05
Add New Post /wp-admin/post-new.php1,427 ▼10717.75 ▼5.20601.58 ▼68.5654.03 ▲1.79
Media Library /wp-admin/upload.php1,407 ▲194.25 ▲0.0797.71 ▼3.1343.66 ▼0.16
Grid Social Boxes /wp-admin/options-general.php?page=grid_social_boxes_settings8132.0224.2830.74

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% 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 0% 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
  • 6× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/grid-social-boxes/vendor/cosenary/instagram/example/popular.php
    • > /wp-content/plugins/grid-social-boxes/vendor/cosenary/instagram/example/index.php
    • > /wp-content/plugins/grid-social-boxes/templates/grid-box-social_timeline.tpl.php
    • > /wp-content/plugins/grid-social-boxes/templates/facebook-post.tpl.php
    • > /wp-content/plugins/grid-social-boxes/vendor/cosenary/instagram/example/success.php
    • > /wp-content/plugins/grid-social-boxes/templates/grid-box-youtube_feed.tpl.php
  • 4095× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/grid-social-boxes/templates/grid-box-youtube_feed.tpl.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/grid-social-boxes/vendor/google/apiclient-services/src/Google/Service/AndroidManagement/SetupAction.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/grid-social-boxes/vendor/google/apiclient-services/src/Google/Service/Analytics/Profile.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/grid-social-boxes/vendor/google/apiclient-services/src/Google/Service/CloudAsset/SearchAllIamPoliciesResponse.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/grid-social-boxes/vendor/google/apiclient-services/src/Google/Service/AndroidProvisioningPartner/UpdateDeviceMetadataInBatchRequest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/grid-social-boxes/vendor/google/apiclient-services/src/Google/Service/Dfareporting/SitesListResponse.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/grid-social-boxes/vendor/google/apiclient-services/src/Google/Service/Dataflow/WorkerSettings.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/grid-social-boxes/vendor/google/apiclient-services/src/Google/Service/CloudRun/TestIamPermissionsResponse.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/grid-social-boxes/vendor/google/apiclient-services/src/Google/Service/CloudUserAccounts/Rule.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/grid-social-boxes/vendor/google/apiclient-services/src/Google/Service/CloudTalentSolution/TimeOfDay.php:18

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 96% from 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: landingpage, admin, editor, containerist, page...

grid-social-boxes/grid-social-boxes.php 92% from 13 tests

This is the main PHP file of "Grid Social Boxes" version 1.6.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected591,780 lines of code in 12,064 files:
LanguageFilesBlank linesComment linesLines of code
PHP11,98431,863363,884583,776
Markdown462,01905,633
JSON21001,884
CSS1239154
PO File13535107
JavaScript21615106
YAML22047
XML42141
Bourne Shell14013
Dockerfile18010
make1409

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 106)
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity1.60
▷ Minimum class complexity1.00
▷ Maximum class complexity632.00
Average method complexity1.08
▷ Minimum method complexity1.00
▷ Maximum method complexity106.00
Code structure
Namespaces57
Interfaces38
Traits10
Classes11,891
▷ Abstract classes140.12%
▷ Concrete classes11,87799.88%
▷ Final classes170.14%
Methods83,352
▷ Static methods2390.29%
▷ Public methods82,83499.38%
▷ Protected methods2070.25%
▷ Private methods3110.37%
Functions234
▷ Named functions11147.44%
▷ Anonymous functions12352.56%
Constants1,004
▷ Global constants777.67%
▷ Class constants92792.33%
▷ Public constants90797.84%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/cosenary/instagram/example/assets/instagram.png9.25KB2.30KB▼ 75.16%
vendor/cosenary/instagram/example/assets/instagram-big.png21.27KB6.17KB▼ 70.98%