78% resourcify

Code Review | Resourcify

WordPress plugin Resourcify scored78%from 54 tests.

About plugin

  • Plugin page: resourcify
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.8
  • WordPress version: 6.3.1
  • First release: Mar 19, 2014
  • Latest release: Apr 4, 2014
  • Number of updates: 14
  • Update frequency: every 2.0 days
  • Top authors: tripflex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,314 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.04MB] [CPU: ▼8.23ms] Passed 4 tests

A check of server-side resources used by Resourcify
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.98 ▼0.4823.97 ▼20.52
Dashboard /wp-admin3.41 ▲0.1151.55 ▲0.15
Posts /wp-admin/edit.php3.52 ▲0.1753.54 ▼1.72
Add New Post /wp-admin/post-new.php6.00 ▲0.1192.10 ▼10.84
Media Library /wp-admin/upload.php3.33 ▲0.1041.30 ▲1.25

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Resourcify
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,895 ▲10913.52 ▼0.8210.15 ▲7.8141.28 ▼4.99
Dashboard /wp-admin2,198 ▲215.62 ▼0.0687.09 ▼2.3041.69 ▼0.75
Posts /wp-admin/edit.php2,100 ▼51.96 ▼0.0435.72 ▼6.4234.56 ▼0.70
Add New Post /wp-admin/post-new.php6,699 ▲5,17319.26 ▼3.57931.19 ▲265.6358.42 ▲4.76
Media Library /wp-admin/upload.php1,403 ▲34.21 ▲0.0296.07 ▼12.3544.88 ▼3.90

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please fix the following
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/resourcify/includes/field-dropdown.php
    • > /wp-content/plugins/resourcify/includes/field-template_vars.php
    • > /wp-content/plugins/resourcify/includes/field-textfield.php
    • > /wp-content/plugins/resourcify/includes/field-codeeditor.php
    • > /wp-content/plugins/resourcify/includes/field-resourcify_about.php
  • 35× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/resourcify/includes/settings-resourcify_output.php:2
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/resourcify/includes/field-textfield.php on line 1
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/resourcify/includes/field-codeeditor.php on line 3
    • > PHP Notice
      Undefined variable: name in wp-content/plugins/resourcify/includes/field-dropdown.php on line 25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/resourcify/includes/settings-template_footer.php:2
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/resourcify/includes/field-dropdown.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/resourcify/configs/resourcify_sources-about.php:15
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/resourcify/includes/field-dropdown.php on line 21
    • > PHP Notice
      Undefined variable: value in wp-content/plugins/resourcify/includes/field-dropdown.php on line 21
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/resourcify/includes/field-codeeditor.php on line 16

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

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can look at the official readme.txt

resourcify/plugincore.php 92% from 13 tests

The primary PHP file in "Resourcify" version 1.2 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("resourcify.php" instead of "plugincore.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected7,679 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4379396,123
PHP18167346785
CSS45129741
PO File10015
Markdown112014
HTML1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity105.00
▷ Minimum class complexity105.00
▷ Maximum class complexity105.00
Average method complexity5.33
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods24
▷ Static methods833.33%
▷ Public methods2083.33%
▷ Protected methods00.00%
▷ Private methods416.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/white.png3.81KB0.11KB▼ 97.05%
assets/images/icon.png3.81KB0.11KB▼ 97.05%