83% simple-plugin-selector

Code Review | Simple Plugin Selector

WordPress plugin Simple Plugin Selector scored83%from 54 tests.

About plugin

  • Plugin page: simple-plugin-sel...
  • Plugin version: 1.3.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.2
  • WordPress version: 6.3.1
  • First release: Sep 10, 2020
  • Latest release: Aug 3, 2023
  • Number of updates: 19
  • Update frequency: every 55.6 days
  • Top authors: lorro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /575 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼11.97ms] Passed 4 tests

An overview of server-side resources used by Simple Plugin Selector
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0746.21 ▲0.98
Dashboard /wp-admin3.45 ▲0.1154.09 ▼23.46
Posts /wp-admin/edit.php3.53 ▲0.1855.83 ▲1.33
Add New Post /wp-admin/post-new.php6.04 ▲0.1589.58 ▼26.73
Media Library /wp-admin/upload.php3.38 ▲0.1641.24 ▲6.30
Simple Plugin Selector /wp-admin/options-general.php?page=simple-plugin-selector3.3643.18

Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please try to fix the following items
  • Illegal file modification found: 10 files (46.95KB) outside of "wp-content/plugins/simple-plugin-selector/" and "wp-content/uploads/"
    • (new file) wp-content/mu-plugins/simple-plugin-selector/js/admin.js
    • (new file) wp-content/mu-plugins/simple-plugin-selector/includes/pages.php
    • (new file) wp-content/mu-plugins/simple-plugin-selector/includes/settings.php
    • (new file) wp-content/mu-plugins/simple-plugin-selector/includes/plugins.php
    • (new file) wp-content/mu-plugins/simple-plugin-selector/includes/filter.php
    • (new file) wp-content/mu-plugins/simple-plugin-selector/languages/simple-plugin-selector.pot
    • (new file) wp-content/mu-plugins/simple-plugin-selector/includes/functions.php
    • (new file) wp-content/mu-plugins/simple-plugin-selector/css/admin.css
    • (new file) wp-content/mu-plugins/simple-plugin-selector.php
    • (new file) wp-content/mu-plugins/simple-plugin-selector/main.php
Filesystem: 12 new files
Database: no new tables, 14 new options
New WordPress options
sps_plugin_load_types
sps_per_page
widget_recent-posts
theysaidso_admin_options
sps_next_plugin_id
widget_recent-comments
sps_pages
sps_page_settings
widget_theysaidso_widget
db_upgraded
...

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Plugin Selector
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.70 ▲0.331.98 ▲0.3041.39 ▼3.19
Dashboard /wp-admin2,206 ▲355.59 ▲0.0187.87 ▼16.7440.25 ▼3.08
Posts /wp-admin/edit.php2,105 ▲52.04 ▲0.1035.74 ▲1.1735.64 ▼0.70
Add New Post /wp-admin/post-new.php1,533 ▼223.00 ▲4.96630.55 ▼26.9251.36 ▼17.13
Media Library /wp-admin/upload.php1,408 ▲114.19 ▲0.0199.60 ▼1.2244.11 ▼1.95
Simple Plugin Selector /wp-admin/options-general.php?page=simple-plugin-selector8811.6924.8331.81

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
Please fix the following items
  • The uninstall procedure has failed, leaving 14 options in the database
    • sps_per_page
    • widget_recent-posts
    • db_upgraded
    • sps_build_nr
    • widget_theysaidso_widget
    • can_compress_scripts
    • sps_page_settings
    • sps_plugin_load_types
    • sps_plugins
    • sps_next_plugin_id
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 8× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/simple-plugin-selector/files/simple-plugin-selector/includes/functions.php
    • > /wp-content/plugins/simple-plugin-selector/files/simple-plugin-selector/includes/filter.php
    • > /wp-content/plugins/simple-plugin-selector/files/simple-plugin-selector/main.php
    • > /wp-content/plugins/simple-plugin-selector/files/simple-plugin-selector/includes/pages.php
    • > /wp-content/plugins/simple-plugin-selector/files/simple-plugin-selector.php
    • > /wp-content/plugins/simple-plugin-selector/simple-plugin-selector-uploader.php
    • > /wp-content/plugins/simple-plugin-selector/files/simple-plugin-selector/includes/settings.php
    • > /wp-content/plugins/simple-plugin-selector/files/simple-plugin-selector/includes/plugins.php

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

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: performance, plugins

simple-plugin-selector/simple-plugin-selector-uploader.php 69% from 13 tests

"Simple Plugin Selector" version 1.3.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Requires PHP: The required version number must match the one declared in readme.txt ("7.3" instead of "7.4")
  • Requires at least: The required version number must match the one declared in readme.txt ("5.6" instead of "6.0")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-plugin-selector.php" instead of "simple-plugin-selector-uploader.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin832 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP8124164737
CSS13253
JavaScript1111142

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG files were detected