10% seo-custom-fields

Code Review | SEO Custom Fields

WordPress plugin SEO Custom Fields scored 10% from 54 tests.

About plugin

  • Plugin page: seo-custom-fields
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7.3
  • WordPress version: 6.3.1
  • First release: Jan 23, 2017
  • Latest release: Mar 9, 2017
  • Number of updates: 28
  • Update frequency: every 1.5 days
  • Top authors: soandso (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,129 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method scfClassInitialization::scf_seo_activation() should not be called statically

Server metrics [RAM: ▼0.98MB] [CPU: ▼35.14ms] Passed 4 tests

An overview of server-side resources used by SEO Custom Fields
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.91 ▼0.5521.65 ▼18.72
Dashboard /wp-admin3.06 ▼0.2424.07 ▼24.22
Posts /wp-admin/edit.php3.06 ▼0.3025.32 ▼19.01
Add New Post /wp-admin/post-new.php3.06 ▼2.8322.73 ▼78.60
Media Library /wp-admin/upload.php3.06 ▼0.1724.43 ▼10.55
SEO Custom Fields /wp-admin/options-general.php?page=metaseo_settings_options3.0623.02

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by SEO Custom Fields
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲5113.68 ▼0.902.02 ▼0.9632.13 ▼14.51
Dashboard /wp-admin2,214 ▲235.86 ▲0.95106.79 ▲5.0741.41 ▼4.59
Posts /wp-admin/edit.php2,097 ▲82.02 ▲0.0140.49 ▲6.2537.66 ▲5.72
Add New Post /wp-admin/post-new.php1,523 ▲923.42 ▲5.92605.05 ▼104.1350.66 ▼36.58
Media Library /wp-admin/upload.php1,399 ▲114.20 ▼0.0194.71 ▼8.8345.06 ▲0.28
SEO Custom Fields /wp-admin/options-general.php?page=metaseo_settings_options8062.0624.2730.37

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method scfClassInitialization::scf_add_menu_seo() should not be called statically
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=metaseo_settings_options
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method scfClassInitialization::scf_add_menu_seo() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=metaseo_settings_options
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method scfClassInitialization::scf_metaseo_admin_settings() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=metaseo_settings_options
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method scfClassInitialization::scf_seo_plugin_scrit() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=metaseo_settings_options
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method scfClassInitialization::scf_add_pluginpage() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=metaseo_settings_options
    • > Deprecated in wp-admin/includes/template.php+1824
    Non-static method scfClassInitialization::scf_number_symbol_title() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=metaseo_settings_options
    • > Notice in wp-content/plugins/seo-custom-fields/init.php+47
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=metaseo_settings_options
    • > Deprecated in wp-admin/includes/template.php+1824
    Non-static method scfClassInitialization::scf_number_symbol_description() should not be called statically

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
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant SCF_PLAGIN_PATH - assumed 'SCF_PLAGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/seo-custom-fields/init.php on line 3
    • > PHP Warning
      include_once(): Failed opening 'SCF_PLAGIN_PATHgeneral.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/seo-custom-fields/init.php on line 3
    • > PHP Warning
      include_once(SCF_PLAGIN_PATHgeneral.php): failed to open stream: No such file or directory in wp-content/plugins/seo-custom-fields/init.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/seo-custom-fields/index.php:32

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=metaseo_settings_options
    • > Javascript (severe) in unknown
    /wp-content/plugins/seo-custom-fields/view/source/js/bootstrap.min.js 5:215 Uncaught Error: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention: The official readme.txt is a good inspiration

seo-custom-fields/index.php 85% from 13 tests

"SEO Custom Fields" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("seo-custom-fields.php" instead of "index.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 185 characters long)

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
Success! There were no dangerous files found in this plugin9,770 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS47247,328
JavaScript35821991,602
PHP47822552
SVG100288

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity7.00
▷ Minimum class complexity4.00
▷ Maximum class complexity11.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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