84% codemanas-social-share

Code Review | CodeManas Social Share

WordPress plugin CodeManas Social Share scored84%from 54 tests.

About plugin

  • Plugin page: codemanas-social-...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.0
  • WordPress version: 6.3.1
  • First release: Nov 12, 2017
  • Latest release: Feb 28, 2019
  • Number of updates: 7
  • Update frequency: every 67.7 days
  • Top authors: codemanas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /813 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

A check of server-side resources used by CodeManas Social Share
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.38 ▲0.17
Dashboard /wp-admin3.32 ▼0.0349.90 ▼10.92
Posts /wp-admin/edit.php3.37 ▲0.0146.83 ▼1.33
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.01 ▼18.96
Media Library /wp-admin/upload.php3.24 ▲0.0139.69 ▲4.39

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
codemanas_social_sharing_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for CodeManas Social Share
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲5914.23 ▼0.322.10 ▲0.1344.51 ▲3.34
Dashboard /wp-admin2,214 ▲345.64 ▲0.0581.61 ▼7.6240.55 ▼4.17
Posts /wp-admin/edit.php2,116 ▲191.99 ▼0.0438.10 ▲2.7734.58 ▼1.55
Add New Post /wp-admin/post-new.php1,539 ▲1322.86 ▼0.46633.16 ▼12.2158.26 ▼1.19
Media Library /wp-admin/upload.php1,413 ▲164.19 ▲0.0394.36 ▼8.1142.34 ▲1.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/codemanas-social-share/codemanas-social-share.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/codemanas-social-share/inc/class/class-codemanas-social-share-shortcode.php:133
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/codemanas-social-share/inc/class/class-codemanas-social-share-admin.php:185
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/codemanas-social-share/inc/views/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/codemanas-social-share/inc/views/admin.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed: You can take inspiration from this readme.txt

codemanas-social-share/codemanas-social-share.php 92% from 13 tests

This is the main PHP file of "CodeManas Social Share" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 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
There were no executable files found in this plugin760 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP57031557
CSS1222093
JavaScript220992
SVG16018

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity23.50
▷ Minimum class complexity19.00
▷ Maximum class complexity28.00
Average method complexity4.46
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods215.38%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin