83% nutsforpress

Code Review | NutsForPress Images and Media

WordPress plugin NutsForPress Images and Media scored83%from 54 tests.

About plugin

  • Plugin page: nutsforpress
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Jan 2, 2021
  • Latest release: Aug 4, 2023
  • Number of updates: 30
  • Update frequency: every 31.5 days
  • Top authors: Christian Gatti (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,456 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
Install script ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▲1.79ms] Passed 4 tests

An overview of server-side resources used by NutsForPress Images and Media
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1839.83 ▼8.06
Dashboard /wp-admin3.48 ▲0.1851.65 ▲4.16
Posts /wp-admin/edit.php3.59 ▲0.2453.55 ▲8.08
Add New Post /wp-admin/post-new.php6.08 ▲0.1996.93 ▲6.15
Media Library /wp-admin/upload.php3.40 ▲0.1738.57 ▲4.90
Images and Media /wp-admin/admin.php?page=nfpmgm-settings3.4334.55
NutsForPress /wp-admin/admin.php?page=nfproot-settings3.3732.85

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for NutsForPress Images and Media
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲9513.34 ▼1.303.76 ▲1.7837.93 ▼1.73
Dashboard /wp-admin2,244 ▲565.88 ▼0.02105.57 ▼0.8538.38 ▼3.00
Posts /wp-admin/edit.php2,133 ▲442.10 ▲0.1042.85 ▲4.4537.69 ▲0.69
Add New Post /wp-admin/post-new.php1,550 ▲3017.67 ▼5.45702.59 ▲32.9252.72 ▼10.07
Media Library /wp-admin/upload.php1,420 ▲324.32 ▲0.1697.08 ▼2.7341.82 ▼0.83
Images and Media /wp-admin/admin.php?page=nfpmgm-settings1,2632.1025.0429.22
NutsForPress /wp-admin/admin.php?page=nfproot-settings8352.0922.8825.76

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
Almost there! Just fix the following items
  • 17× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/nutsforpress/includes/nfpmgm-plugin-deactivate.php
    • > /wp-content/plugins/nutsforpress/admin/includes/nfpmgm-thumbnails-rebuild.php
    • > /wp-content/plugins/nutsforpress/admin/includes/nfpmgm-size-actions.php
    • > /wp-content/plugins/nutsforpress/admin/nfpmgm-settings-content.php
    • > /wp-content/plugins/nutsforpress/root/nfproot-styles-and-scripts.php
    • > /wp-content/plugins/nutsforpress/includes/nfpmgm-styles-and-scripts.php
    • > /wp-content/plugins/nutsforpress/admin/includes/nfpmgm-size-actions-on-delete.php
    • > /wp-content/plugins/nutsforpress/admin/includes/nfpmgm-quality-actions.php
    • > /wp-content/plugins/nutsforpress/admin/nfpmgm-settings.php
    • > /wp-content/plugins/nutsforpress/includes/nfpmgm-plugin-activate.php

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 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
  • Requires php: The plugin version is formatted incorrectly
You can take inspiration from this readme.txt

nutsforpress/nuts-for-press-images-and-media.php 85% from 13 tests

The main PHP script in "NutsForPress Images and Media" version 1.7 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("nutsforpress.php" instead of "nuts-for-press-images-and-media.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 217 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,765 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP171,0442501,427
JavaScript314462226
CSS1291112

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.57
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%
Functions38
▷ Named functions3386.84%
▷ Anonymous functions513.16%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin