10% csh-multiscroll

Code Review | CSH Multiscroll

WordPress plugin CSH Multiscroll scored 10% from 54 tests.

About plugin

  • Plugin page: csh-multiscroll
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.8
  • WordPress version: 6.3.1
  • First release: Oct 12, 2018
  • Latest release: Oct 12, 2018
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: cmssuperheroes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,533 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'cshms_install' not found or invalid function name

Server metrics [RAM: ▲0.17MB] [CPU: ▼0.21ms] Passed 4 tests

Analyzing server-side resources used by CSH Multiscroll
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2052.17 ▲12.69
Dashboard /wp-admin3.46 ▲0.1550.55 ▲3.21
Posts /wp-admin/edit.php3.57 ▲0.2149.48 ▲0.29
Add New Post /wp-admin/post-new.php6.06 ▲0.1888.48 ▼4.12
Media Library /wp-admin/upload.php3.38 ▲0.1536.84 ▼0.21
All Multiscrolls /wp-admin/edit.php?post_type=pt-multiscroll3.4237.48
Add New /wp-admin/post-new.php?post_type=pt-multiscroll3.4648.92

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

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

Browser metrics Passed 4 tests

A check of browser resources used by CSH Multiscroll
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,232 ▲49716.59 ▲2.2130.61 ▲28.4242.32 ▼2.59
Dashboard /wp-admin2,274 ▲836.39 ▲1.29107.69 ▲9.3438.77 ▼3.06
Posts /wp-admin/edit.php2,135 ▲433.10 ▲1.0141.76 ▲1.3930.52 ▼5.21
Add New Post /wp-admin/post-new.php1,566 ▲4723.89 ▲0.76661.13 ▼12.7537.23 ▼13.83
Media Library /wp-admin/upload.php1,453 ▲625.67 ▲1.44108.82 ▲8.3046.52 ▲2.72
All Multiscrolls /wp-admin/edit.php?post_type=pt-multiscroll1,1083.1441.9727.10
Add New /wp-admin/post-new.php?post_type=pt-multiscroll1,8555.1380.9439.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'cshms_uninstall' not found or invalid function name
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant CSHMS_PLUGIN_PUBLIC_DIR - assumed 'CSHMS_PLUGIN_PUBLIC_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/csh-multiscroll/includes/class-csh-multiscroll.php on line 98
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_head() in wp-content/plugins/csh-multiscroll/templates/cshms-content.php:1
    • > PHP Warning
      require_once(CSHMS_PLUGIN_PUBLIC_DIRclass-csh-multiscroll-public.php): failed to open stream: No such file or directory in wp-content/plugins/csh-multiscroll/includes/class-csh-multiscroll.php on line 98
    • > PHP Fatal error
      require_once(): Failed opening required 'CSHMS_PLUGIN_PUBLIC_DIRclass-csh-multiscroll-public.php' (include_path='.:/usr/share/php') in wp-content/plugins/csh-multiscroll/includes/class-csh-multiscroll.php on line 98

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • License uri: Invalid URI found ("")
The official readme.txt is a good inspiration

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

The principal PHP file in "CSH Multiscroll" v. 1.0.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected2,051 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP8136181866
JavaScript7204185770
CSS5466346
PO File1262769

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity23.00
▷ Minimum class complexity2.00
▷ Maximum class complexity59.00
Average method complexity3.64
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods2896.55%
▷ Protected methods00.00%
▷ Private methods13.45%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/setting-icon.png1.87KB1.36KB▼ 27.36%