89% native-performance

Code Review | Native Performance

WordPress plugin Native Performance scored89%from 54 tests.

About plugin

  • Plugin page: native-performance
  • Plugin version: 1.2.8
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9.9
  • WordPress version: 6.3.1
  • First release: Nov 3, 2017
  • Latest release: Jul 26, 2023
  • Number of updates: 50
  • Update frequency: every 41.8 days
  • Top authors: cristiandalvarez (52%)quecodig (50%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,511 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼10.42ms] Passed 4 tests

Analyzing server-side resources used by Native Performance
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2034.46 ▼2.83
Dashboard /wp-admin3.38 ▲0.0340.95 ▼18.37
Posts /wp-admin/edit.php3.49 ▲0.1345.61 ▼1.12
Add New Post /wp-admin/post-new.php5.96 ▲0.0781.36 ▼19.35
Media Library /wp-admin/upload.php3.30 ▲0.0737.87 ▲4.94

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Native Performance
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,745 ▼113.03 ▼1.321.34 ▼0.3141.95 ▲2.62
Dashboard /wp-admin2,159 ▼265.71 ▼0.17109.82 ▲8.9779.27 ▲36.01
Posts /wp-admin/edit.php2,083 ▼62.02 ▼0.0338.09 ▼2.0835.23 ▼6.31
Add New Post /wp-admin/post-new.php1,256 ▼28613.56 ▼4.54368.77 ▼283.8932.60 ▼21.10
Media Library /wp-admin/upload.php1,376 ▼154.17 ▼0.05112.29 ▲3.7069.73 ▲24.97

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
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: performance, cache, optimization, heartbeat api, speed...

native-performance/native-performance.php 85% from 13 tests

The main PHP script in "Native Performance" version 1.2.8 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 185 characters long)
  • Requires at least: The required version number must match the one declared in readme.txt ("4.9" instead of "4.0")

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 plugin606 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP1276143356
Sass1242136
PO File2182270
SVG21143
CSS1011

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions25
▷ Named functions2080.00%
▷ Anonymous functions520.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/icon.png15.26KB0.63KB▼ 95.89%