84% wp-webpnative

Code Review | WP WebPNative

WordPress plugin WP WebPNative scored84%from 54 tests.

About plugin

  • Plugin page: wp-webpnative
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3.2
  • WordPress version: 6.3.1
  • First release: Mar 28, 2020
  • Latest release: Mar 28, 2020
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: alexalouit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /505 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.88ms] Passed 4 tests

Analyzing server-side resources used by WP WebPNative
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0734.88 ▼4.51
Dashboard /wp-admin3.37 ▲0.0647.15 ▼2.66
Posts /wp-admin/edit.php3.42 ▲0.0649.07 ▲1.77
Add New Post /wp-admin/post-new.php5.95 ▲0.0682.29 ▼14.10
Media Library /wp-admin/upload.php3.29 ▲0.0636.81 ▲5.19
WP WebPNative /wp-admin/options-general.php?page=wpwebpnative3.2542.96

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP WebPNative
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8514.77 ▲0.021.93 ▲0.1841.09 ▼4.50
Dashboard /wp-admin2,209 ▲245.81 ▼0.07107.07 ▼8.7638.79 ▼4.55
Posts /wp-admin/edit.php2,095 ▲62.03 ▼0.0140.92 ▲4.4733.44 ▼2.31
Add New Post /wp-admin/post-new.php1,533 ▼223.08 ▼0.21633.70 ▲32.4352.71 ▲0.66
Media Library /wp-admin/upload.php1,394 ▲34.16 ▼0.0495.49 ▼4.3140.20 ▼4.61
WP WebPNative /wp-admin/options-general.php?page=wpwebpnative8182.0323.4943.47

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • wpwebpnative_transparent
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-webpnative/wp-webpnative.php:15

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: speed, seo, performance, webp, compressing...

wp-webpnative/wp-webpnative.php Passed 13 tests

"WP WebPNative" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
27 characters long description:
WebP support for Wordpress.

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
Good job! No executable or dangerous file extensions detected279 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15312274
CSS1005

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
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%
Functions16
▷ Named functions16.25%
▷ Anonymous functions1593.75%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin