84% resources

Code Review | Simple Resources Plugin

WordPress plugin Simple Resources Plugin scored84%from 54 tests.

About plugin

  • Plugin page: resources
  • Plugin version: 0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5
  • WordPress version: 6.3.1
  • First release: Jan 7, 2013
  • Latest release: Jan 7, 2013
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: robert.kay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,357 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Simple Resources Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0535.26 ▼2.01
Dashboard /wp-admin3.35 ▲0.0143.38 ▼14.66
Posts /wp-admin/edit.php3.40 ▲0.0553.28 ▲6.60
Add New Post /wp-admin/post-new.php5.93 ▲0.0589.85 ▼15.53
Media Library /wp-admin/upload.php3.27 ▲0.0533.86 ▲0.45
Add New /wp-admin/post-new.php?post_type=resource3.4150.62
Resources /wp-admin/edit.php?post_type=resource3.3135.91
Types /wp-admin/edit-tags.php?taxonomy=restype&post_type=resource3.2731.03

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Resources Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲9013.59 ▼0.801.67 ▼0.0739.68 ▼4.95
Dashboard /wp-admin2,228 ▲375.80 ▲0.7297.98 ▼3.7640.48 ▼3.46
Posts /wp-admin/edit.php2,120 ▲282.04 ▲0.0639.65 ▼1.3634.80 ▼0.59
Add New Post /wp-admin/post-new.php1,570 ▲2818.36 ▲0.09576.10 ▼44.9048.06 ▼3.74
Media Library /wp-admin/upload.php1,422 ▲314.20 ▼0.0095.81 ▼5.2541.01 ▼0.12
Add New /wp-admin/post-new.php?post_type=resource2,6597.85175.1267.60
Resources /wp-admin/edit.php?post_type=resource1,1151.9330.9430.23
Types /wp-admin/edit-tags.php?taxonomy=restype&post_type=resource1,2962.1325.7328.27

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/resources/Resources.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === resources === )
Please take inspiration from this readme.txt

resources/Resources.php 92% from 13 tests

The main PHP file in "Simple Resources Plugin" ver. 0.6 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("resources.php" instead of "Resources.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin118 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12616109
CSS1209

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for 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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin