78% lorem-carousel

Code Review | Lorem Carousel - Responsive Image Slider for WordPress

WordPress plugin Lorem Carousel - Responsive Image Slider for WordPress scored78%from 54 tests.

About plugin

  • Plugin page: lorem-carousel
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.3
  • WordPress version: 6.3.1
  • First release: Dec 22, 2019
  • Latest release: Dec 27, 2019
  • Number of updates: 8
  • Update frequency: every 0.6 days
  • Top authors: anranik (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /720 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
Installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼7.69ms] Passed 4 tests

This is a short check of server-side resources used by Lorem Carousel - Responsive Image Slider for WordPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.96 ▼7.19
Dashboard /wp-admin3.46 ▲0.1559.54 ▼7.59
Posts /wp-admin/edit.php3.50 ▲0.1556.62 ▼9.76
Add New Post /wp-admin/post-new.php5.99 ▲0.11103.97 ▼6.23
Media Library /wp-admin/upload.php3.36 ▲0.1437.38 ▼2.90
All Carousels /wp-admin/edit.php?post_type=lorem_carousel3.4254.80
Add New Carousel /wp-admin/post-new.php?post_type=lorem_carousel3.8165.59

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 360 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Lorem Carousel - Responsive Image Slider for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,958 ▲21213.73 ▼0.646.76 ▲4.6648.51 ▼4.16
Dashboard /wp-admin2,248 ▲605.87 ▼0.03110.54 ▼46.2447.79 ▼11.87
Posts /wp-admin/edit.php2,131 ▲392.08 ▲0.0744.64 ▼8.5733.21 ▼8.52
Add New Post /wp-admin/post-new.php1,562 ▲4823.06 ▼0.69658.91 ▼159.5165.12 ▲3.62
Media Library /wp-admin/upload.php1,433 ▲454.20 ▲0.08105.81 ▼17.4244.34 ▼8.94
All Carousels /wp-admin/edit.php?post_type=lorem_carousel1,1152.0043.1935.90
Add New Carousel /wp-admin/post-new.php?post_type=lorem_carousel1,8193.7081.4938.03

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

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
The following issues need your attention
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/lorem-carousel/public/partials/lorem-carousel-public-display.php
    • > /wp-content/plugins/lorem-carousel/admin/partials/lorem-carousel-admin-display.php
  • 39× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/lorem-carousel/inc/cmb2/includes/types/CMB2_Type_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Multicheck' not found in wp-content/plugins/lorem-carousel/inc/cmb2/includes/types/CMB2_Type_Taxonomy_Multicheck_Hierarchical.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/lorem-carousel/inc/cmb2/includes/types/CMB2_Type_Text.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/lorem-carousel/inc/cmb2/example-functions.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/lorem-carousel/inc/cmb2/includes/types/CMB2_Type_Taxonomy_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/lorem-carousel/inc/cmb2/includes/types/CMB2_Type_Textarea.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/lorem-carousel/inc/cmb2/includes/types/CMB2_Type_File_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/lorem-carousel/inc/cmb2/includes/types/CMB2_Type_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_REST_Controller' not found in wp-content/plugins/lorem-carousel/inc/cmb2/includes/rest-api/CMB2_REST_Controller_Boxes.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/lorem-carousel/inc/cmb2/includes/types/CMB2_Type_Colorpicker.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

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
Attributes that need to be fixed:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5 in lorem-carousel/assets to your readme.txt
  • Tags: Please reduce the number of tags, currently 42 tag instead of maximum 10
Please take inspiration from this readme.txt

lorem-carousel/lorem-carousel.php Passed 13 tests

The main PHP file in "Lorem Carousel - Responsive Image Slider for WordPress" ver. 1.2.2 adds more information about the plugin and also serves as the entry point for this plugin
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

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
No dangerous file extensions were detected46,325 lines of code in 214 files:
LanguageFilesBlank linesComment linesLines of code
PO File12014,31518,50232,323
PHP672,2236,6567,260
CSS151,1701,1614,679
JavaScript103595801,431
Markdown22140632

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity16.92
▷ Minimum class complexity1.00
▷ Maximum class complexity183.00
Average method complexity3.15
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes73
▷ Abstract classes810.96%
▷ Concrete classes6589.04%
▷ Final classes00.00%
Methods543
▷ Static methods8816.21%
▷ Public methods44782.32%
▷ Protected methods8816.21%
▷ Private methods81.47%
Functions42
▷ Named functions42100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants440.00%
▷ Class constants660.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/cmb2/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
inc/cmb2/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
inc/cmb2/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
inc/cmb2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
inc/cmb2/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%