83% ajax-marketing-slider-lite

Code Review | Ajax Marketing Slider Lite

WordPress plugin Ajax Marketing Slider Lite scored83%from 54 tests.

About plugin

  • Plugin page: ajax-marketing-sl...
  • Plugin version: 0.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.1
  • WordPress version: 6.3.1
  • First release: Mar 30, 2016
  • Latest release: May 24, 2016
  • Number of updates: 28
  • Update frequency: every 2.0 days
  • Top authors: soamnovum (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /8,422 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▼3.50ms] Passed 4 tests

A check of server-side resources used by Ajax Marketing Slider Lite
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0841.19 ▼0.42
Dashboard /wp-admin3.42 ▲0.1251.59 ▼0.59
Posts /wp-admin/edit.php3.53 ▲0.1847.46 ▲1.76
Add New Post /wp-admin/post-new.php6.01 ▲0.1282.69 ▼13.66
Media Library /wp-admin/upload.php3.32 ▲0.0934.74 ▲0.66
Add New /wp-admin/post-new.php?post_type=soasl_slider3.4247.31
All Sliders /wp-admin/edit.php?post_type=soasl_slider3.3938.34

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 136 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Ajax Marketing Slider Lite
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,143 ▲39717.09 ▲2.4121.36 ▲19.5251.22 ▲7.35
Dashboard /wp-admin2,402 ▲2146.94 ▲1.06119.15 ▲0.6939.29 ▼6.20
Posts /wp-admin/edit.php2,327 ▲2383.46 ▲1.4149.94 ▲12.5731.14 ▼5.18
Add New Post /wp-admin/post-new.php1,601 ▲8723.45 ▲5.92630.52 ▼2.1935.29 ▼21.23
Media Library /wp-admin/upload.php1,457 ▲754.59 ▲0.4082.14 ▼16.4241.85 ▼0.84
Add New /wp-admin/post-new.php?post_type=soasl_slider4,5244.86129.04105.91
All Sliders /wp-admin/edit.php?post_type=soasl_slider1,2963.7448.6627.73

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% 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)
Good news, no errors were detected

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 items
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_filter() in wp-content/plugins/ajax-marketing-slider-lite/marketing-slider-lite.php:10
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/ajax-marketing-slider-lite/themes/full_width/full_width_with_ads.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/ajax-marketing-slider-lite/includes/full_width.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ajax-marketing-slider-lite/admin/includes/post_types.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ajax-marketing-slider-lite/admin/includes/post_types.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ajax-marketing-slider-lite/admin/includes/product_metabox.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ajax-marketing-slider-lite/admin/includes/ads_metaboxes.php:3

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 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === ajax-marketing-slider-lite === )
Please take inspiration from this readme.txt

ajax-marketing-slider-lite/marketing-slider-lite.php 92% from 13 tests

The main PHP file in "Ajax Marketing Slider Lite" ver. 0.0.4 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ajax-marketing-slider-lite.php" instead of "marketing-slider-lite.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin17,488 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript121,9756148,760
CSS131,0122136,368
PHP101,8651872,324
SVG20036

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity41.00
▷ Minimum class complexity13.00
▷ Maximum class complexity69.00
Average method complexity6.00
▷ Minimum method complexity1.00
▷ Maximum method complexity68.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions41
▷ Named functions4097.56%
▷ Anonymous functions12.44%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
64 compressed PNG files occupy 0.54MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
imgs/slidenavs/next4.png1.02KB1.23KB0.00%
themes/full_width/img/buy/24.png4.70KB2.91KB▼ 38.23%
imgs/slidenavs/previous7.png0.49KB0.71KB0.00%
themes/full_width/img/buy/15.png3.62KB3.24KB▼ 10.32%
themes/full_width/img/c-jssor-slider.png2.01KB1.89KB▼ 6.07%