84% simple-owl-shortcodes

Code Review | Simple Owl Shortcodes

WordPress plugin Simple Owl Shortcodes scored84%from 54 tests.

About plugin

  • Plugin page: simple-owl-shortc...
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Dec 27, 2016
  • Latest release: Jan 11, 2017
  • Number of updates: 13
  • Update frequency: every 1.2 days
  • Top authors: sszdh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /851 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.04MB] [CPU: ▼6.31ms] Passed 4 tests

Server-side resources used by Simple Owl Shortcodes
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0536.34 ▼2.95
Dashboard /wp-admin3.36 ▲0.0144.93 ▼21.60
Posts /wp-admin/edit.php3.41 ▲0.0547.07 ▼0.07
Add New Post /wp-admin/post-new.php5.94 ▲0.0592.83 ▲4.54
Media Library /wp-admin/upload.php3.28 ▲0.0532.72 ▼0.60
Simple Owl Shortcodes /wp-admin/options-general.php?page=simple-owl-shortcodes/owl-carousel-shortcodes.php3.2445.12

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Owl Shortcodes
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,924 ▲18914.08 ▼0.216.15 ▲4.3040.29 ▼7.48
Dashboard /wp-admin2,212 ▲244.83 ▼1.05110.73 ▼3.0641.87 ▼7.99
Posts /wp-admin/edit.php2,098 ▲92.05 ▲0.0838.92 ▲4.7033.83 ▼2.51
Add New Post /wp-admin/post-new.php1,533 ▼023.41 ▲0.17642.16 ▼28.6159.17 ▲8.93
Media Library /wp-admin/upload.php1,397 ▲124.20 ▲0.0199.57 ▲2.3841.72 ▲0.32
Simple Owl Shortcodes /wp-admin/options-general.php?page=simple-owl-shortcodes/owl-carousel-shortcodes.php8712.0531.6233.04

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • owls_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/simple-owl-shortcodes/inc/owls_wrapper.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/simple-owl-shortcodes/inc/owls_item.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/simple-owl-shortcodes/inc/owls_wrapper.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: wordpress, owl carousel, shortcode

simple-owl-shortcodes/owl-carousel-shortcodes.php 85% from 13 tests

The main PHP file in "Simple Owl Shortcodes" ver. 2.1.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("simple-owl-shortcodes.php" instead of "owl-carousel-shortcodes.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin2,512 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript54769172,006
CSS72355230
PHP3209142
Markdown340076
PO File1223458

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/owl_item.png1.94KB0.89KB▼ 54.13%
assets/images/owl_wrapper.png2.00KB0.90KB▼ 55.12%
assets/libs/owlcarousel/assets/owl.video.play.png4.86KB2.74KB▼ 43.61%