93% essential-addons-for-cornerstone-lite

Code Review | Essential Addons for Cornerstone

WordPress plugin Essential Addons for Cornerstone scored 93% from 54 tests.

About plugin

  • Plugin page: essential-addons-...
  • Plugin version: 1.4.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.9.7
  • WordPress version: 5.9.2
  • First release: Jun 5, 2017
  • Latest release: Jul 23, 2018
  • Number of updates: 17
  • Update frequency: every 24.3 days
  • Top authors: codetic (70.59%)re_enter_rupok (35.29%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active / 4,910 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.02MB] [CPU: ▼308.02ms] Passed 4 tests

This is a short check of server-side resources used by Essential Addons for Cornerstone
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▼0.0452.89 ▼9.71
Dashboard /wp-admin3.43 ▲0.0235.08 ▼2.98
Posts /wp-admin/edit.php3.65 ▲0.0241.36 ▼3.81
Add New Post /wp-admin/post-new.php6.89 ▼0.08103.87 ▼1,215.59
Media Library /wp-admin/upload.php3.31 ▲0.0131.65 ▲7.22

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 59 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Essential Addons for Cornerstone
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,787 ▲4115.77 ▲0.106.31 ▼1.422.31 ▼0.16
Dashboard /wp-admin2,911 ▲546.11 ▲0.00121.01 ▼27.43244.72 ▲78.48
Posts /wp-admin/edit.php2,708 ▲203.10 ▼0.1363.07 ▲0.42139.55 ▲4.20
Add New Post /wp-admin/post-new.php1,721 ▲2322.01 ▼0.64458.80 ▲23.26200.46 ▼0.82
Media Library /wp-admin/upload.php1,716 ▲215.54 ▲0.01133.64 ▼22.85220.27 ▼26.15

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 106× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: centered_slides in wp-content/plugins/essential-addons-for-cornerstone-lite/includes/team-members/shortcode.php on line 60
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cs_atts() in wp-content/plugins/essential-addons-for-cornerstone-lite/includes/post-carousel/shortcode.php:62
    • > PHP Notice
      Undefined variable: centered_slides in wp-content/plugins/essential-addons-for-cornerstone-lite/includes/logo-carousel/shortcode.php on line 48
    • > PHP Notice
      Undefined variable: preset_style in wp-content/plugins/essential-addons-for-cornerstone-lite/includes/product-carousel/shortcode.php on line 39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/essential-addons-for-cornerstone-lite/includes/product-carousel/controls.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/essential-addons-for-cornerstone-lite/includes/testimonial-slider/controls.php:14
    • > PHP Notice
      Undefined variable: centered_slides in wp-content/plugins/essential-addons-for-cornerstone-lite/includes/post-carousel/shortcode.php on line 48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cs_atts() in wp-content/plugins/essential-addons-for-cornerstone-lite/includes/testimonial-slider/shortcode.php:59
    • > PHP Notice
      Undefined variable: auto_play in wp-content/plugins/essential-addons-for-cornerstone-lite/includes/post-carousel/shortcode.php on line 47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/essential-addons-for-cornerstone-lite/includes/shortcodes/post-grid.php:143

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention: The official readme.txt is a good inspiration

essential-addons-for-cornerstone-lite/essential_addons_cs.php 77% from 13 tests

The entry point to "Essential Addons for Cornerstone" version 1.4.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 160 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("essential-addons-for-cornerstone-lite.php" instead of "essential_addons_cs.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; 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
Good job! No executable or dangerous file extensions detected11,152 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript59517705,968
PHP441,0445533,886
CSS4180441,178
SVG130120

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity2.82
▷ Minimum class complexity1.00
▷ Maximum class complexity21.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/eacs-logo.png20.46KB8.39KB▼ 59.02%
admin/assets/images/ea-icon.png1.15KB0.26KB▼ 77.51%
admin/assets/images/lock-icon.png1.96KB1.21KB▼ 38.14%