84% magic-theme-mods-holder

Code Review | Magic Theme Mods Holder

WordPress plugin Magic Theme Mods Holder scored84%from 54 tests.

About plugin

  • Plugin page: magic-theme-mods-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2
  • WordPress version: 6.3.1
  • First release: May 21, 2019
  • Latest release: May 21, 2019
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: Nora0123456789 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /450 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.82ms] Passed 4 tests

A check of server-side resources used by Magic Theme Mods Holder
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.11 ▼3.62
Dashboard /wp-admin3.32 ▲0.0145.59 ▼3.90
Posts /wp-admin/edit.php3.37 ▲0.0246.31 ▼0.27
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.60 ▼17.41
Media Library /wp-admin/upload.php3.24 ▲0.0132.91 ▼2.36
Theme Mods Holder /wp-admin/themes.php?page=mtmh3.2730.26

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Magic Theme Mods Holder
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.43 ▼0.021.92 ▲0.1943.22 ▲3.12
Dashboard /wp-admin2,207 ▲255.80 ▼0.0796.85 ▼8.2239.89 ▼1.42
Posts /wp-admin/edit.php2,096 ▲71.96 ▼0.0234.71 ▼7.6235.89 ▼2.24
Add New Post /wp-admin/post-new.php6,247 ▲4,70525.93 ▲7.52885.38 ▲276.0056.53 ▼0.25
Media Library /wp-admin/upload.php1,392 ▲74.17 ▼0.0493.61 ▼4.1341.73 ▼0.52
Theme Mods Holder /wp-admin/themes.php?page=mtmh1,0242.0624.5223.42

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 27× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: theme_mods_data in wp-content/plugins/magic-theme-mods-holder/inc/views/admin-page/form-current-theme-mods-row.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/magic-theme-mods-holder/inc/views/admin-page/form-theme-mods-table.php:2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/magic-theme-mods-holder/inc/views/admin-page/form-theme-mods-table-row.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mtmh() in wp-content/plugins/magic-theme-mods-holder/inc/exec/updates/admin-page/filter-theme-mods.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/magic-theme-mods-holder/inc/views/admin-page/form-filter-theme-mods.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mtmh() in wp-content/plugins/magic-theme-mods-holder/inc/exec/updates/admin-page/register-theme-mods.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/magic-theme-mods-holder/inc/views/metabox.php:3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/magic-theme-mods-holder/inc/views/admin-page/form-current-theme-mods-row.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/magic-theme-mods-holder/inc/views/admin-page/form-theme-mods-table-row.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/magic-theme-mods-holder/inc/views/admin-page/form-current-theme-mods-row.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
1 plugin tags: theme mods

magic-theme-mods-holder/magic-theme-mods-holder.php 85% from 13 tests

"Magic Theme Mods Holder" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path is invalid: folder "/i18n/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin817 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP20236140817

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity10.00
▷ Minimum class complexity4.00
▷ Maximum class complexity23.00
Average method complexity1.84
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods43
▷ Static methods49.30%
▷ Public methods3479.07%
▷ Protected methods00.00%
▷ Private methods920.93%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.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
No PNG images were found in this plugin