78% simple-settings

Code Review | Simple Settings

WordPress plugin Simple Settings scored78%from 54 tests.

About plugin

  • Plugin page: simple-settings
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.7.1
  • WordPress version: 6.3.1
  • First release: Dec 6, 2013
  • Latest release: Dec 9, 2013
  • Number of updates: 26
  • Update frequency: every 0.1 days
  • Top authors: jklatt86 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /1,464 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.56MB] [CPU: ▼18.40ms] Passed 4 tests

An overview of server-side resources used by Simple Settings
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1144.75 ▼0.68
Dashboard /wp-admin3.45 ▲0.1546.17 ▼14.81
Posts /wp-admin/edit.php3.49 ▲0.1449.17 ▲6.58
Add New Post /wp-admin/post-new.php3.26 ▼2.6337.78 ▼56.65
Media Library /wp-admin/upload.php3.39 ▲0.1735.83 ▼1.46
Simple Settings /wp-admin/edit.php?post_type=ilmss3.3940.08
Add New /wp-admin/post-new.php?post_type=ilmss3.2537.55

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Simple Settings
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,858 ▲11213.16 ▼1.152.21 ▲0.1846.03 ▼1.07
Dashboard /wp-admin2,236 ▲484.87 ▼0.9899.15 ▼16.3739.34 ▼5.27
Posts /wp-admin/edit.php2,122 ▲331.99 ▼0.0537.24 ▼3.2934.62 ▼3.94
Add New Post /wp-admin/post-new.php1,563 ▲4918.78 ▲1.24607.37 ▼17.7850.84 ▲0.32
Media Library /wp-admin/upload.php1,421 ▲334.22 ▼0.0196.01 ▼7.3644.56 ▲0.43
Simple Settings /wp-admin/edit.php?post_type=ilmss1,0861.9838.2328.83
Add New /wp-admin/post-new.php?post_type=ilmss1,5352.5552.1464.13

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/post-new.php?post_type=ilmss
    • > Notice in wp-content/plugins/simple-settings/ilmss.php+361
    Undefined index: ilmss_type
    • > GET request to /wp-admin/post-new.php?post_type=ilmss
    • > Notice in wp-content/plugins/simple-settings/ilmss.php+379
    Trying to get property 'post_title' of non-object
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ilmss
    • > Notice in wp-content/plugins/simple-settings/ilmss.php+384
    Trying to get property 'ID' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=ilmss
    • > Notice in wp-content/plugins/simple-settings/ilmss.php+314
    Undefined index: type
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ilmss
    • > Notice in wp-content/plugins/simple-settings/ilmss.php+315
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/post-new.php?post_type=ilmss
    • > Notice in wp-content/plugins/simple-settings/ilmss.php+315
    Undefined index: value

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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/simple-settings/ilmss.php:44

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
1 plugin tags: settings

simple-settings/ilmss.php 92% from 13 tests

The main PHP script in "Simple Settings" version 1.2 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-settings.php" instead of "ilmss.php")

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
No dangerous file extensions were detected466 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1188254308
CSS12841112
JavaScript1415546

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods1785.00%
▷ Protected methods210.00%
▷ Private methods15.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icons/bitbucket.png16.47KB5.96KB▼ 63.81%
images/icons/plugin.png9.85KB3.77KB▼ 61.69%