10% csh-callback

Code Review | CSH Callback

WordPress plugin CSH Callback scored 10% from 54 tests.

About plugin

  • Plugin page: csh-callback
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 21, 2018
  • Latest release: Mar 27, 2018
  • Number of updates: 5
  • Update frequency: every 1.4 days
  • Top authors: cmssuperheroes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,341 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/csh-callback/includes/widget-callback.php+5
    Function create_function() is deprecated

Server metrics [RAM: ▼1.81MB] [CPU: ▼50.58ms] Passed 4 tests

An overview of server-side resources used by CSH Callback
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.297.03 ▼31.27
Dashboard /wp-admin2.19 ▼1.119.85 ▼41.65
Posts /wp-admin/edit.php2.20 ▼1.169.08 ▼37.55
Add New Post /wp-admin/post-new.php2.19 ▼3.696.64 ▼91.85
Media Library /wp-admin/upload.php2.19 ▼1.037.13 ▼27.76
Call Request /wp-admin/admin.php?page=call-request-list2.208.98
Settings /wp-admin/admin.php?page=call-request-settings2.207.64

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 44 new files
Database: 1 new table, 7 new options
New tables
wp_csh_callback_request
New WordPress options
db_upgraded
widget_cshcb_callback
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for CSH Callback
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,028 ▲27114.20 ▼0.1814.15 ▲12.3251.61 ▲6.01
Dashboard /wp-admin2,232 ▲434.91 ▼0.02113.93 ▲1.9745.22 ▲6.43
Posts /wp-admin/edit.php2,118 ▲292.03 ▲0.0237.17 ▲0.4634.70 ▲3.92
Add New Post /wp-admin/post-new.php1,539 ▼322.87 ▲4.69602.31 ▼11.6177.02 ▲4.77
Media Library /wp-admin/upload.php1,420 ▲354.20 ▼0.0595.22 ▼12.3941.74 ▼6.34
Call Request /wp-admin/admin.php?page=call-request-list8012.0724.8722.88
Settings /wp-admin/admin.php?page=call-request-settings1,9004.5186.0530.72

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/csh-callback/includes/widget-callback.php+5
    Function create_function() is deprecated
  • Zombie tables were found after uninstall: 1 table
    • wp_csh_callback_request
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_cshcb_callback
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=call-request-settings
    • > Deprecated in wp-content/plugins/csh-callback/includes/widget-callback.php+5
    Function create_function() is deprecated

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
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant CSHCB_PLUGIN_PUBLIC_DIR - assumed 'CSHCB_PLUGIN_PUBLIC_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/csh-callback/includes/class-csh-callback.php on line 98
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/csh-callback/layouts/active/active-form.php:2
    • > PHP Fatal error
      require_once(): Failed opening required 'CSHCB_PLUGIN_PUBLIC_DIRclass-csh-callback-public.php' (include_path='.:/usr/share/php') in wp-content/plugins/csh-callback/includes/class-csh-callback.php on line 98
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/csh-callback/layouts/widget/widget-form.php:2
    • > PHP Warning
      require_once(CSHCB_PLUGIN_PUBLIC_DIRclass-csh-callback-public.php): failed to open stream: No such file or directory in wp-content/plugins/csh-callback/includes/class-csh-callback.php on line 98
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/csh-callback/layouts/shortcode/shortcode-form.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/csh-callback/includes/widget-callback.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
Attributes that require attention:
  • Screenshots: These screenshots lack descriptions #3, #4 in csh-callback/assets to your readme.txt
Please take inspiration from this readme.txt

csh-callback/csh-callback.php 92% from 13 tests

Analyzing the main PHP file in "CSH Callback" version 1.0.0
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 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected6,116 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
SVG30122,880
CSS7899112,019
PHP122832371,051
JavaScript31817166

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity14.17
▷ Minimum class complexity2.00
▷ Maximum class complexity50.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods44
▷ Static methods00.00%
▷ Public methods4193.18%
▷ Protected methods00.00%
▷ Private methods36.82%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants13100.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/phone.png12.09KB4.64KB▼ 61.60%
assets/images/callback.png1.75KB0.95KB▼ 45.62%