78% wp-page-loading

Code Review | WP Page Loading

WordPress plugin WP Page Loading scored78%from 54 tests.

About plugin

  • Plugin page: wp-page-loading
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Oct 31, 2019
  • Latest release: Dec 7, 2022
  • Number of updates: 23
  • Update frequency: every 49.3 days
  • Top authors: kalenz (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /10,555 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲1.66MB] [CPU: ▲16.22ms] Passed 4 tests

This is a short check of server-side resources used by WP Page Loading
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.16 ▲1.6963.73 ▲20.87
Dashboard /wp-admin4.94 ▲1.6478.27 ▲24.22
Posts /wp-admin/edit.php5.06 ▲1.7063.98 ▲9.35
Add New Post /wp-admin/post-new.php7.58 ▲1.69116.48 ▲13.70
Media Library /wp-admin/upload.php4.84 ▲1.6157.57 ▲20.95
WP Loading Options /wp-admin/admin.php?page=wp_loading_page_options5.0066.63

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 481 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WP Page Loading
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,104 ▲34318.14 ▲3.771.78 ▼0.1638.66 ▼9.00
Dashboard /wp-admin2,495 ▲3189.01 ▲3.36168.39 ▲80.0042.37 ▼4.11
Posts /wp-admin/edit.php2,426 ▲3266.23 ▲4.2584.14 ▲48.2832.04 ▼8.16
Add New Post /wp-admin/post-new.php6,568 ▲5,04226.94 ▲4.011,024.99 ▲338.5240.74 ▼8.38
Media Library /wp-admin/upload.php1,563 ▲1636.48 ▲2.31115.10 ▲7.3945.80 ▼3.22
WP Loading Options /wp-admin/admin.php?page=wp_loading_page_options1,9587.65250.8328.94

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-page-loading/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
  • 112× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/wp-page-loading/vendor/htmlburger/carbon-fields/core/Field/Complex_Field.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Comparer\\Comparer' not found in wp-content/plugins/wp-page-loading/vendor/htmlburger/carbon-fields/core/Container/Condition/Comparer/Any_Contain_Comparer.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Textarea_Field' not found in wp-content/plugins/wp-page-loading/vendor/htmlburger/carbon-fields/core/Field/Rich_Text_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/wp-page-loading/vendor/htmlburger/carbon-fields/core/Field/Hidden_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-page-loading/vendor/htmlburger/carbon-fields/templates/Container/common/options-page.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Container' not found in wp-content/plugins/wp-page-loading/vendor/htmlburger/carbon-fields/core/Container/Term_Meta_Container.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Service\\Service' not found in wp-content/plugins/wp-page-loading/vendor/htmlburger/carbon-fields/core/Service/Legacy_Storage_Service_v_1_5.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Select_Field' not found in wp-content/plugins/wp-page-loading/vendor/htmlburger/carbon-fields/core/Field/Gravity_Form_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-page-loading/vendor/htmlburger/carbon-fields/templates/Container/widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Fulfillable\\Translator\\Translator' not found in wp-content/plugins/wp-page-loading/vendor/htmlburger/carbon-fields/core/Container/Fulfillable/Translator/Array_Translator.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: loading, load, preload, wp loading, loader...

wp-page-loading/wp-loading-page.php 77% from 13 tests

The entry point to "WP Page Loading" version 1.0.5 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-page-loading.php" instead of "wp-loading-page.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 155 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected28,278 lines of code in 424 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1725,1918,46212,970
PHP1492,6396,6369,107
PO File268191,0202,202
Sass4833901,769
CSS73251,1391,662
JSON1900500
Markdown324068

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity8.43
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.03
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces23
Interfaces5
Traits0
Classes124
▷ Abstract classes118.87%
▷ Concrete classes11391.13%
▷ Final classes10.88%
Methods937
▷ Static methods10010.67%
▷ Public methods75981.00%
▷ Protected methods16517.61%
▷ Private methods131.39%
Functions102
▷ Named functions2120.59%
▷ Anonymous functions8179.41%
Constants31
▷ Global constants825.81%
▷ Class constants2374.19%
▷ Public constants23100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.45MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png40.92KB19.83KB▼ 51.53%
assets/banner-772x250.png13.63KB6.98KB▼ 48.81%
assets/banner-1544x500.png6.77KB3.36KB▼ 50.37%
assets/icon-128x128.png1.57KB1.03KB▼ 34.80%
assets/screenshot-2.png394.78KB159.57KB▼ 59.58%