78% core-settings

Code Review | Core Settings

WordPress plugin Core Settings scored 78% from 54 tests.

About plugin

  • Plugin page: core-settings
  • Plugin version: 1.01
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-5.4.1
  • WordPress version: 5.8.1
  • First release: Aug 13, 2018
  • Latest release: May 10, 2020
  • Number of updates: 12
  • Update frequency: every 53.1 days
  • Top authors: shra (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 384 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.89MB] [CPU: ▼169.16ms] Passed 4 tests

Analyzing server-side resources used by Core Settings
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1432.74 ▲9.72
Dashboard /wp-admin2.76 ▼0.3023.31 ▼16.48
Posts /wp-admin/edit.php2.76 ▼0.3626.75 ▼31.11
Add New Post /wp-admin/post-new.php2.76 ▼2.6726.40 ▼620.98
Media Library /wp-admin/upload.php2.76 ▼0.2421.37 ▼8.08
Core settings /wp-admin/options-general.php?page=core-settings/core-settings.php2.7626.19

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 1 new option
New WordPress options
core_settings_plugin

Browser metrics Passed 4 tests

Core Settings: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,672 ▲3515.87 ▼0.037.73 ▼3.1656.60 ▲8.39
Dashboard /wp-admin2,975 ▲415.94 ▲0.01143.95 ▼8.12119.20 ▲1.12
Posts /wp-admin/edit.php2,741 ▲22.81 ▲0.1267.86 ▼9.3094.14 ▼2.68
Add New Post /wp-admin/post-new.php1,673 ▼1016.27 ▼2.52420.61 ▲27.03110.64 ▼5.68
Media Library /wp-admin/upload.php1,812 ▲55.03 ▲0.01145.54 ▼7.05115.59 ▼17.80
Core settings /wp-admin/options-general.php?page=core-settings/core-settings.php1,4002.0862.6295.02

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
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=core-settings/core-settings.php
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=core-settings/core-settings.php
    • > Notice in wp-content/plugins/core-settings/core-settings.php+32
    Undefined index: action

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 fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_uninstall_hook() in wp-content/plugins/core-settings/core-settings.php:312

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Core settings admin page.) image required
Please take inspiration from this readme.txt

core-settings/core-settings.php Passed 13 tests

"Core Settings" version 1.01's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
103 characters long description:
Fights against unnecessary WP core settings, removes needless metas and links from header html section.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected242 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14035242

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods444.44%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png40.46KB21.74KB▼ 46.26%