83% hero-section-for-elementor

Code Review | hero for elementor

WordPress plugin hero for elementor scored 83% from 54 tests.

About plugin

  • Plugin page: hero-section-for-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2.4
  • WordPress version: 6.3.1
  • First release: Mar 5, 2020
  • Latest release: Mar 5, 2020
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: pixertheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,499 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
Installer ran successfully

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

A check of server-side resources used by hero for elementor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.71 ▼1.92
Dashboard /wp-admin3.32 ▲0.0242.64 ▼5.26
Posts /wp-admin/edit.php3.37 ▲0.0246.16 ▼4.60
Add New Post /wp-admin/post-new.php5.90 ▲0.0281.61 ▼10.96
Media Library /wp-admin/upload.php3.24 ▲0.0233.25 ▼3.48

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for hero for elementor
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲8313.28 ▼1.044.07 ▲2.2440.14 ▼4.94
Dashboard /wp-admin2,221 ▲335.84 ▲0.9998.78 ▼14.4540.31 ▼1.67
Posts /wp-admin/edit.php2,106 ▲172.04 ▼0.0835.25 ▼3.9734.61 ▼1.15
Add New Post /wp-admin/post-new.php1,527 ▼1517.73 ▼0.49662.21 ▲51.2864.08 ▲14.18
Media Library /wp-admin/upload.php1,406 ▲154.15 ▼0.1296.39 ▼5.5541.37 ▼3.87

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • 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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function hero_for_elementor\\add_action() in wp-content/plugins/hero-section-for-elementor/plugin.php:117

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt is a good inspiration

hero-section-for-elementor/heros-for-elementor.php 85% from 13 tests

The principal PHP file in "hero for elementor" v. 1.0.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("hero-section-for-elementor.php" instead of "heros-for-elementor.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin3,498 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS3465222,874
PHP6122177617
JavaScript1227

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity3.60
▷ Minimum class complexity2.00
▷ Maximum class complexity7.00
Average method complexity1.45
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods29
▷ Static methods13.45%
▷ Public methods2379.31%
▷ Protected methods620.69%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.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
2 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/polygon.png0.88KB0.48KB▼ 45.28%
assets/images/dot_circle.png44.36KB41.42KB▼ 6.61%