78% inherit-theme-mods

Code Review | Inherit Theme Mods

WordPress plugin Inherit Theme Mods scored 78% from 54 tests.

About plugin

  • Plugin page: inherit-theme-mods
  • Plugin version: 2.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.6.1
  • WordPress version: 6.3.1
  • First release: May 12, 2016
  • Latest release: Oct 9, 2016
  • Number of updates: 23
  • Update frequency: every 6.5 days
  • Top authors: kamataryo (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active / 11,877 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.32ms] Passed 4 tests

An overview of server-side resources used by Inherit Theme Mods
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.11 ▼1.91
Dashboard /wp-admin3.32 ▲0.0247.80 ▲2.39
Posts /wp-admin/edit.php3.37 ▲0.0244.27 ▼2.76
Add New Post /wp-admin/post-new.php5.90 ▲0.0283.53 ▼13.37
Media Library /wp-admin/upload.php3.25 ▲0.0236.98 ▲0.76
Inherit Theme Mods /wp-admin/options-general.php?page=inherit-theme-mods3.1025.28

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 56 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Inherit Theme Mods: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.30 ▼1.321.77 ▲0.1044.09 ▲6.48
Dashboard /wp-admin2,210 ▲194.82 ▼0.05110.92 ▲4.4441.95 ▲0.85
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0732.82 ▼2.1533.72 ▲2.21
Add New Post /wp-admin/post-new.php1,536 ▲1723.03 ▼0.13657.34 ▼17.5751.24 ▼5.73
Media Library /wp-admin/upload.php1,392 ▲14.17 ▼0.0592.14 ▼14.8743.95 ▼2.13
Inherit Theme Mods /wp-admin/options-general.php?page=inherit-theme-mods9232.0827.7933.50

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

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 server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=inherit-theme-mods
    • > Deprecated in wp-content/plugins/inherit-theme-mods/functions.php+26
    implode(): Passing glue string after array is deprecated. Swap the parameters

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
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/inherit-theme-mods/inherit-theme-mods-table.php on line 7
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/inherit-theme-mods/inherit-theme-mods-table.php on line 7
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/inherit-theme-mods/inherit-theme-mods-table.php on line 7
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/inherit-theme-mods/inherit-theme-mods-table.php on line 7
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/inherit-theme-mods/inherit-theme-mods-table.php on line 7
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/inherit-theme-mods/inherit-theme-mods-table.php on line 7

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

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: inspector, property, inherit, customizer, settings...

inherit-theme-mods/functions.php 92% from 13 tests

The main PHP file in "Inherit Theme Mods" ver. 2.1.2 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("inherit-theme-mods.php" instead of "functions.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 detected7,187 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
CSS317172,293
Sass1434341,656
LESS1434441,646
SVG100685
PHP57671473
PO File13639111
JavaScript17096
Bourne Shell1211094
JSON30071
CoffeeScript122162

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity8.50
▷ Minimum class complexity4.00
▷ Maximum class complexity12.00
Average method complexity1.77
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods37
▷ Static methods1027.03%
▷ Public methods3491.89%
▷ Protected methods00.00%
▷ Private methods38.11%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin