78% paj-featured-image-owl-carousel

Code Review | PAJ Featured Image Owl Carousel / Slider

WordPress plugin PAJ Featured Image Owl Carousel / Slider scored78%from 54 tests.

About plugin

  • Plugin page: paj-featured-imag...
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.4
  • WordPress version: 6.3.1
  • First release: Sep 18, 2017
  • Latest release: Apr 6, 2020
  • Number of updates: 17
  • Update frequency: every 55.0 days
  • Top authors: phillip2532 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /3,449 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.21ms] Passed 4 tests

Analyzing server-side resources used by PAJ Featured Image Owl Carousel / Slider
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.14 ▼8.61
Dashboard /wp-admin3.31 ▲0.0149.95 ▲3.94
Posts /wp-admin/edit.php3.36 ▲0.0045.22 ▼0.70
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.49 ▼13.12
Media Library /wp-admin/upload.php3.23 ▲0.0036.23 ▲1.58

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

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

Browser metrics Passed 4 tests

PAJ Featured Image Owl Carousel / Slider: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,973 ▲20213.66 ▼0.609.50 ▲7.6340.37 ▼4.77
Dashboard /wp-admin2,204 ▲135.83 ▲0.9496.68 ▼5.2737.30 ▼4.65
Posts /wp-admin/edit.php2,096 ▲72.00 ▼0.0635.10 ▼3.5031.82 ▼1.08
Add New Post /wp-admin/post-new.php1,538 ▲2423.25 ▲5.80699.73 ▲34.3247.53 ▼2.74
Media Library /wp-admin/upload.php1,392 ▲14.18 ▲0.0194.12 ▼7.2644.43 ▼0.87

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

Smoke tests 50% 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 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
Please fix the following items
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/paj-featured-image-owl-carousel/paj-widgets/paj-carousel/shortcode/paj-carousel-shortcode.php
    • > /wp-content/plugins/paj-featured-image-owl-carousel/paj-carousel-widget.php
    • > /wp-content/plugins/paj-featured-image-owl-carousel/paj-widgets/paj-carousel/paj-carousel.php
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/paj-featured-image-owl-carousel/paj-widgets/paj-carousel/tpl/paj-carousel-template.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/paj-featured-image-owl-carousel/paj-widgets/paj-carousel/tpl/paj-carousel-template.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/paj-featured-image-owl-carousel/paj-widgets/paj-carousel/tpl/paj-carousel-template.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/paj-featured-image-owl-carousel/paj-widgets/paj-carousel/tpl/paj-carousel-template.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/paj-featured-image-owl-carousel/paj-widgets/paj-carousel/tpl/paj-carousel-template.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_shortcode() in wp-content/plugins/paj-featured-image-owl-carousel/paj-widgets/paj-carousel/tpl/paj-carousel-template.php:12
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/paj-featured-image-owl-carousel/paj-widgets/paj-carousel/tpl/paj-carousel-template.php on line 3

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

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
The official readme.txt might help

paj-featured-image-owl-carousel/paj-carousel-widget.php 92% from 13 tests

The main PHP script in "PAJ Featured Image Owl Carousel / Slider" version 1.2.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("paj-featured-image-owl-carousel.php" instead of "paj-carousel-widget.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
No dangerous file extensions were detected3,250 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript45029311,998
PHP419049736
CSS26936361
SVG101155

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to 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
paj-widgets/paj-carousel/shortcode/css/owl.video.play.png4.86KB2.74KB▼ 43.61%