84% calculate-page-execution-time

Code Review | Calculate Page Execution Time

WordPress plugin Calculate Page Execution Time scored84%from 54 tests.

About plugin

  • Plugin page: calculate-page-ex...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8
  • WordPress version: 6.3.1
  • First release: Jun 27, 2017
  • Latest release: Jun 27, 2017
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: Milap (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /716 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼11.51ms] Passed 4 tests

This is a short check of server-side resources used by Calculate Page Execution Time
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0133.77 ▼7.11
Dashboard /wp-admin3.31 ▲0.0143.84 ▼5.60
Posts /wp-admin/edit.php3.36 ▲0.0145.81 ▼8.14
Add New Post /wp-admin/post-new.php5.89 ▲0.0179.30 ▼25.19
Media Library /wp-admin/upload.php3.23 ▲0.0135.16 ▲1.49

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Calculate Page Execution Time: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.37 ▼1.011.57 ▼0.1639.93 ▼3.44
Dashboard /wp-admin2,206 ▲185.88 ▲0.07103.08 ▼2.6238.90 ▼3.56
Posts /wp-admin/edit.php2,092 ▼02.05 ▲0.0140.67 ▼0.8534.59 ▼3.24
Add New Post /wp-admin/post-new.php1,540 ▼223.44 ▲5.01662.35 ▲49.2155.69 ▲0.60
Media Library /wp-admin/upload.php1,391 ▲34.15 ▼0.07102.98 ▲5.6045.19 ▲4.58

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/calculate-page-execution-time/calculate-page-execution-time.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 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
3 plugin tags: php script loading time, execution time, script loading time

calculate-page-execution-time/calculate-page-execution-time.php Passed 13 tests

"Calculate Page Execution Time" version 0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
109 characters long description:
This plugin will calculate page execution time for your WordPress website, just active it & View Page Source.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin22 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP111322

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods2100.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png58.90KB18.09KB▼ 69.28%