84% load-web-components

Code Review | Load Web Components

WordPress plugin Load Web Components scored84%from 54 tests.

About plugin

  • Plugin page: load-web-components
  • Plugin version: 0.1.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.8.2
  • WordPress version: 6.3.1
  • First release: Oct 21, 2017
  • Latest release: Oct 23, 2017
  • Number of updates: 10
  • Update frequency: every 1.2 days
  • Top authors: Friese (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /886 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.87ms] Passed 4 tests

An overview of server-side resources used by Load Web Components
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0142.48 ▲4.97
Dashboard /wp-admin3.36 ▲0.0648.97 ▼4.46
Posts /wp-admin/edit.php3.41 ▲0.0647.11 ▼1.43
Add New Post /wp-admin/post-new.php5.94 ▲0.0688.27 ▼13.67
Media Library /wp-admin/upload.php3.28 ▲0.0637.77 ▲0.07
Load Web Components /wp-admin/options-general.php?page=load_webcomponents3.2536.70

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

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

Browser metrics Passed 4 tests

Load Web Components: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.69 ▲0.041.70 ▲0.1542.31 ▼0.06
Dashboard /wp-admin2,202 ▲225.64 ▼0.0284.28 ▼9.1136.07 ▼5.49
Posts /wp-admin/edit.php2,104 ▲12.00 ▼0.0034.45 ▼7.6939.76 ▲2.08
Add New Post /wp-admin/post-new.php1,531 ▲323.03 ▼0.07705.65 ▲66.3253.29 ▲1.98
Media Library /wp-admin/upload.php1,401 ▲14.16 ▲0.0399.23 ▲1.5442.96 ▼5.17
Load Web Components /wp-admin/options-general.php?page=load_webcomponents9092.0124.1230.85

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

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 | 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 add_action() in wp-content/plugins/load-web-components/load-webcomponents_admin.php:61

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: load by shortcode, load via shortcode, custom elements, extented html, web component...

load-web-components/load-webcomponents.php 85% from 13 tests

Analyzing the main PHP file in "Load Web Components" version 0.1.1
The following require your attention:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: Name the main plugin file the same as the plugin slug ("load-web-components.php" instead of "load-webcomponents.php")

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
Success! There were no dangerous files found in this plugin434 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP28398340
PO File1212194

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.53
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%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin