84% zerowp-social-profiles

Code Review | Social Profiles

WordPress plugin Social Profiles scored84%from 54 tests.

About plugin

  • Plugin page: zerowp-social-pro...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.3
  • WordPress version: 6.3.1
  • First release: Jul 25, 2017
  • Latest release: Jun 28, 2019
  • Number of updates: 20
  • Update frequency: every 35.2 days
  • Top authors: _smartik_ (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /2,496 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.36MB] [CPU: ▼2.78ms] Passed 4 tests

An overview of server-side resources used by Social Profiles
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3841.85 ▼3.96
Dashboard /wp-admin3.69 ▲0.3950.31 ▲0.28
Posts /wp-admin/edit.php3.74 ▲0.3854.59 ▼7.46
Add New Post /wp-admin/post-new.php6.23 ▲0.3499.16 ▲5.54
Media Library /wp-admin/upload.php3.55 ▲0.3240.63 ▲0.03

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 56 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_zsp_about_user
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_zsp_social_profiles_list_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Social Profiles
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.23 ▼1.442.32 ▲0.4541.95 ▼1.76
Dashboard /wp-admin2,206 ▲244.84 ▼1.03109.76 ▼3.3339.67 ▼3.09
Posts /wp-admin/edit.php2,092 ▼02.05 ▲0.0440.17 ▼6.4535.64 ▼5.46
Add New Post /wp-admin/post-new.php1,514 ▼1417.82 ▼0.43678.02 ▲59.5652.92 ▼4.99
Media Library /wp-admin/upload.php1,385 ▼34.25 ▲0.07106.88 ▼0.8945.41 ▼0.66

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_zsp_social_profiles_list_widget
    • widget_zsp_about_user

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
Everything seems fine, however 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
Please fix the following items
  • 25× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      include_once(): Failed opening 'ZSP_PATHautoloader.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/zerowp-social-profiles/plugin.php on line 78
    • > PHP Warning
      include_once(ZSP_PATHfunctions.php): failed to open stream: No such file or directory in wp-content/plugins/zerowp-social-profiles/plugin.php on line 79
    • > PHP Fatal error
      Uncaught Error: Class 'SocialProfiles\\GeneralForm\\AbstractFieldType' not found in wp-content/plugins/zerowp-social-profiles/engine/GeneralForm/FieldInput.class.php:4
    • > PHP Warning
      include_once(): Failed opening 'ZSP_PATHfunctions.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/zerowp-social-profiles/plugin.php on line 79
    • > PHP Fatal error
      Uncaught Error: Class 'SocialProfiles\\GeneralForm\\AbstractFieldType' not found in wp-content/plugins/zerowp-social-profiles/engine/GeneralForm/FieldBrandsRepeater.class.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'SocialProfiles\\GeneralForm\\AbstractFieldType' not found in wp-content/plugins/zerowp-social-profiles/engine/GeneralForm/FieldSelect.class.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/zerowp-social-profiles/engine/Widget/AbstractWidget.class.php:4
    • > PHP Warning
      Use of undefined constant ZSP_VERSION - assumed 'ZSP_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/zerowp-social-profiles/plugin.php on line 74
    • > PHP Warning
      Use of undefined constant ZSP_PATH - assumed 'ZSP_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/zerowp-social-profiles/plugin.php on line 411
    • > PHP Fatal error
      Uncaught Error: Class 'SocialProfiles\\GeneralForm\\AbstractFieldType' not found in wp-content/plugins/zerowp-social-profiles/engine/GeneralForm/FieldRadio.class.php:4

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 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #1, #10, #11, #12, #13, #14, #15, #2, #3, #4, #5, #6, #7, #8, #9 in zerowp-social-profiles/assets to your readme.txt
  • Plugin Name: You should set the name of your plugin on the first line ( === zerowp-social-profiles === )
Please take inspiration from this readme.txt

zerowp-social-profiles/zerowp-social-profiles.php Passed 13 tests

This is the main PHP file of "Social Profiles" version 1.2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
50 characters long description:
Create links to profiles from 170+ social networks

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin3,040 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP324495101,458
LESS341191,043
CSS320236
SVG100184
JavaScript25820119

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity7.88
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes25
▷ Abstract classes520.00%
▷ Concrete classes2080.00%
▷ Final classes210.00%
Methods92
▷ Static methods55.43%
▷ Public methods8996.74%
▷ Protected methods33.26%
▷ Private methods00.00%
Functions6
▷ Named functions233.33%
▷ Anonymous functions466.67%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin