84% disable-native-image-compression

Code Review | Disable Native Image Compression

WordPress plugin Disable Native Image Compression scored84%from 54 tests.

About plugin

  • Plugin page: disable-native-im...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.3
  • WordPress version: 6.3.1
  • First release: Apr 4, 2020
  • Latest release: Apr 4, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: sathesh95 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /628 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.13ms] Passed 4 tests

Server-side resources used by Disable Native Image Compression
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.86 ▼11.34
Dashboard /wp-admin3.31 ▲0.0145.39 ▼6.90
Posts /wp-admin/edit.php3.36 ▲0.0048.50 ▲1.82
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.85 ▼18.18
Media Library /wp-admin/upload.php3.23 ▲0.0034.73 ▼0.10

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Disable Native Image Compression
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.35 ▼1.201.78 ▼0.3244.34 ▼2.08
Dashboard /wp-admin2,203 ▲185.82 ▼0.0398.68 ▼20.3740.10 ▼2.28
Posts /wp-admin/edit.php2,089 ▲32.03 ▲0.0142.39 ▲7.1536.23 ▲3.63
Add New Post /wp-admin/post-new.php1,543 ▲1023.31 ▲0.03651.42 ▼7.5656.03 ▲3.87
Media Library /wp-admin/upload.php1,382 ▼04.21 ▲0.0095.44 ▼4.4644.07 ▲0.34

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/disable-native-image-compression/disable-native-image-compression.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% 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
3 plugin tags: images, disable image compression, upload

disable-native-image-compression/disable-native-image-compression.php 92% from 13 tests

Analyzing the main PHP file in "Disable Native Image Compression" version 1.0
The following require your attention:
  • Text Domain: The text domain should only use lowercase characters and dashes

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
Everything looks great! No dangerous files found in this plugin3 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11103

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
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