73% performance-profiler

Code Review | Performance Profiler

WordPress plugin Performance Profiler scored 73% from 54 tests.

About plugin

  • Plugin page: performance-profiler
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Apr 7, 2016
  • Latest release: Apr 7, 2016
  • Number of updates: 5
  • Update frequency: every 1.6 days
  • Top authors: nevma (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 4,029 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
This plugin's installer ran successfully

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

A check of server-side resources used by Performance Profiler
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.26 ▼4.93
Dashboard /wp-admin3.33 ▲0.0344.80 ▼7.64
Posts /wp-admin/edit.php3.44 ▲0.0947.80 ▲0.31
Add New Post /wp-admin/post-new.php5.91 ▲0.0293.44 ▼2.35
Media Library /wp-admin/upload.php3.25 ▲0.0231.93 ▼5.08
Performance Profiler Plugin /wp-admin/options-general.php?page=performance-profiler3.2529.52

Server storage [IO: ▲0.21MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 23 new files
Database: 1 new table, 6 new options
New tables
wp_nppp
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Performance Profiler: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.19 ▼1.161.72 ▼0.2240.88 ▼3.31
Dashboard /wp-admin2,210 ▲245.86 ▲0.97108.64 ▼14.2040.44 ▼5.90
Posts /wp-admin/edit.php2,093 ▲72.05 ▲0.0439.81 ▲3.9535.94 ▲4.21
Add New Post /wp-admin/post-new.php1,537 ▲423.61 ▲0.76660.21 ▲23.5757.53 ▲2.79
Media Library /wp-admin/upload.php1,386 ▲14.23 ▲0.01102.16 ▲3.6540.94 ▼2.23
Performance Profiler Plugin /wp-admin/options-general.php?page=performance-profiler9472.1426.3146.10

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=performance-profiler
    • > Notice in wp-content/plugins/performance-profiler/inc/Nevma_Performance_Profiler_Plugin.class.php+230
    Undefined index: HTTP_REFERER

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
The following issues need your attention
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/performance-profiler/index.php
    • > /wp-content/plugins/performance-profiler/views/home.php
  • 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_url() on null in wp-content/plugins/performance-profiler/views/sidebar.php:16
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_title() on null in wp-content/plugins/performance-profiler/views/footer.php:5
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_title() on null in wp-content/plugins/performance-profiler/views/info.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Nevma_Base_Plugin' not found in wp-content/plugins/performance-profiler/inc/Nevma_Performance_Profiler_Plugin.class.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/performance-profiler/views/cleanup.php:10
    • > PHP Notice
      Undefined variable: plugin in wp-content/plugins/performance-profiler/views/info.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'Nevma_Performance_Profiler_Plugin_DB' not found in wp-content/plugins/performance-profiler/views/statistics.php:10
    • > PHP Notice
      Undefined variable: plugin in wp-content/plugins/performance-profiler/views/cleanup.php on line 10
    • > PHP Notice
      Undefined variable: plugin in wp-content/plugins/performance-profiler/views/sidebar.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'Nevma_Performance_Profiler_Plugin' not found in wp-content/plugins/performance-profiler/views/index.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (Plugin settings page in the admin area.), #2 (Resized versions of your images are cached by default in `/wp-content/cache/adaptive-images`.), #3 (Total web page load time is reduced dramatically on a mobile device (tested in http://webpagetest.org/).), #4 (Each device is served an image resized its real dimensions, therefore a lot smaller in total size.)
You can take inspiration from this readme.txt

performance-profiler/performance-profiler.php Passed 13 tests

This is the main PHP file of "Performance Profiler" version 0.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
103 characters long description:
Performance Profiler plugin silently monitors the resources consumption of your WordPress installation.

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 plugin840 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP1549060805
CSS139635

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity14.00
▷ Minimum class complexity3.00
▷ Maximum class complexity23.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods47
▷ Static methods48.51%
▷ Public methods4697.87%
▷ Protected methods00.00%
▷ Private methods12.13%
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

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.13MB with 0.07MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/developer.png57.97KB18.86KB▼ 67.47%
assets/img/nevma.png52.88KB25.57KB▼ 51.65%
assets/img/banner.png17.90KB7.89KB▼ 55.90%