94% health-and-medical-addons-for-kingcomposer

Code Review | Health & Medical Addons for KingComposer

WordPress plugin Health & Medical Addons for KingComposer scored 94% from 53 tests.

About plugin

  • Plugin page: health-and-medica...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.0
  • WordPress version: 5.8.1
  • First release: Apr 11, 2019
  • Latest release: Apr 11, 2019
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: themebon (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 599 total downloads

Benchmarks

Plugin footprint Passed 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.00MB] [CPU: ▼266.19ms] Passed 4 tests

A check of server-side resources used by Health & Medical Addons for KingComposer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.1134.80 ▲11.18
Dashboard /wp-admin3.06 ▲0.0041.72 ▼4.21
Posts /wp-admin/edit.php3.11 ▲0.0041.04 ▼3.99
Add New Post /wp-admin/post-new.php5.42 ▼0.0194.71 ▼1,052.19
Media Library /wp-admin/upload.php3.00 ▼0.0134.38 ▼4.36

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Health & Medical Addons for KingComposer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,650 ▲4415.87 ▲0.387.77 ▼0.4461.23 ▲18.36
Dashboard /wp-admin2,928 ▲755.92 ▼0.07146.24 ▲11.95107.46 ▲1.85
Posts /wp-admin/edit.php2,706 ▼02.70 ▲0.0166.36 ▼4.54103.40 ▲12.29
Add New Post /wp-admin/post-new.php1,588 ▼26321.43 ▲3.71266.22 ▼102.78107.72 ▲1.49
Media Library /wp-admin/upload.php1,772 ▲35.01 ▲0.01146.67 ▼5.75109.91 ▼6.95

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please take a closer look at the following
  • 25× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/health-and-medical-addons-for-kingcomposer/addons/heading.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/health-and-medical-addons-for-kingcomposer/addons/icons.php:82
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/health-and-medical-addons-for-kingcomposer/addons/flip-box-3d/flip-box-3d.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/health-and-medical-addons-for-kingcomposer/addons/fluid-section-one.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/health-and-medical-addons-for-kingcomposer/addons/departments.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/health-and-medical-addons-for-kingcomposer/addons/about-us.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/health-and-medical-addons-for-kingcomposer/addons/flip-box/flip-box.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/health-and-medical-addons-for-kingcomposer/addons/blog.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/health-and-medical-addons-for-kingcomposer/addons/call-to-action-two.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/health-and-medical-addons-for-kingcomposer/addons/portfolio-carousel.php:3

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

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can look at the official readme.txt

health-and-medical-addons-for-kingcomposer/medical-addons.php 92% from 13 tests

This is the main PHP file of "Health & Medical Addons for KingComposer" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("health-and-medical-addons-for-kingcomposer.php" instead of "medical-addons.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected34,819 lines of code in 68 files:
LanguageFilesBlank linesComment linesLines of code
CSS241,68636318,293
JavaScript92,6261,9246,922
PHP271,352226,015
SVG3033,544
HTML50045

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions53
▷ Named functions53100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/img/pronobox_icon.png0.42KB0.30KB▼ 28.37%
assets/admin/img/hover_effects_icon.png2.06KB1.21KB▼ 41.43%
assets/admin/img/infobox_icon.png0.61KB0.46KB▼ 23.96%
assets/css/images/ui-icons_555555_256x240.png6.84KB4.18KB▼ 38.84%
assets/css/images/ui-icons_444444_256x240.png6.84KB4.18KB▼ 38.90%