78% home-animation-slider

Code Review | Home animation slider

WordPress plugin Home animation slider scored78%from 54 tests.

About plugin

  • Plugin page: home-animation-sl...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 6.3.1
  • First release: Feb 14, 2019
  • Latest release: Apr 12, 2020
  • Number of updates: 5
  • Update frequency: every 84.6 days
  • Top authors: nalam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /626 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.16MB] [CPU: ▼3.53ms] Passed 4 tests

Analyzing server-side resources used by Home animation slider
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.28 ▼2.01
Dashboard /wp-admin3.51 ▲0.2145.49 ▼2.44
Posts /wp-admin/edit.php3.55 ▲0.2047.98 ▲1.23
Add New Post /wp-admin/post-new.php6.11 ▲0.2285.06 ▼10.90
Media Library /wp-admin/upload.php3.43 ▲0.2041.41 ▲6.79
All slider /wp-admin/edit.php?post_type=haslider-slider3.4738.73
Add New slider /wp-admin/post-new.php?post_type=haslider-slider3.8654.79

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 434 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Home animation slider: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,955 ▲22014.10 ▼0.2812.71 ▲10.3158.35 ▲12.91
Dashboard /wp-admin2,244 ▲595.91 ▲1.01101.73 ▼5.4938.14 ▼8.45
Posts /wp-admin/edit.php2,127 ▲352.08 ▲0.0438.88 ▲2.7433.85 ▼1.51
Add New Post /wp-admin/post-new.php1,544 ▲2423.40 ▲0.16675.84 ▲6.8155.14 ▲5.08
Media Library /wp-admin/upload.php1,423 ▲354.25 ▲0.05102.35 ▼10.4449.74 ▲3.56
All slider /wp-admin/edit.php?post_type=haslider-slider1,1101.9935.8229.24
Add New slider /wp-admin/post-new.php?post_type=haslider-slider2,3724.0172.7541.89

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/home-animation-slider/admin/src/cmb2/apigen/hook-docs.php
  • 51× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Select' not found in wp-content/plugins/home-animation-slider/admin/src/cmb2/includes/types/CMB2_Type_Select_Timezone.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/home-animation-slider/admin/src/cmb2/includes/types/CMB2_Type_Taxonomy_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/home-animation-slider/admin/src/cmb2/cmb2-conditionals.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/home-animation-slider/admin/src/cmb2/includes/CMB2_Field.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/home-animation-slider/admin/src/cmb2/includes/types/CMB2_Type_Picker_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_hookup' not found in wp-content/plugins/home-animation-slider/admin/src/cmb2/includes/CMB2_Options_Hookup.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/home-animation-slider/admin/src/cmb2/includes/CMB2_hookup.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/home-animation-slider/admin/haslider-slider-update-massage.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/home-animation-slider/admin/haslider-slider-admin-role.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/home-animation-slider/admin/src/cmb2/includes/types/CMB2_Type_Textarea.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
  • Donate link: Invalid URI found ("")
You can look at the official readme.txt

home-animation-slider/home-animation-slider.php 92% from 13 tests

Analyzing the main PHP file in "Home animation slider" version 1.0.0
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, 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
Success! There were no dangerous files found in this plugin56,715 lines of code in 247 files:
LanguageFilesBlank linesComment linesLines of code
PO File12014,31518,50232,323
PHP682,4916,6009,062
CSS221,8331,2368,357
SVG2002,959
JavaScript195226692,635
Sass16300251,379

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity19.00
▷ Minimum class complexity1.00
▷ Maximum class complexity183.00
Average method complexity3.32
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes70
▷ Abstract classes811.43%
▷ Concrete classes6288.57%
▷ Final classes00.00%
Methods547
▷ Static methods9317.00%
▷ Public methods45282.63%
▷ Protected methods9016.45%
▷ Private methods50.91%
Functions60
▷ Named functions60100.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants637.50%
▷ Class constants1062.50%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
22 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/src/cmb2/apigen/theme-bootstrap/src/resources/inherit.png0.15KB0.10KB▼ 29.61%
admin/src/cmb2/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
admin/src/cmb2/apigen/theme-bootstrap/src/resources/collapsed.png0.24KB0.14KB▼ 41.77%
admin/src/cmb2/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
admin/src/cmb2/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%