67% custom-field-data-icons

Code Review | Custom Field Data Icons

WordPress plugin Custom Field Data Icons scored67%from 54 tests.

About plugin

  • Plugin page: custom-field-data...
  • Plugin version: 1.8.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.0.3
  • WordPress version: 6.3.1
  • First release: Aug 5, 2015
  • Latest release: Jan 22, 2019
  • Number of updates: 104
  • Update frequency: every 12.2 days
  • Top authors: easycpmods (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,822 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.83MB] [CPU: ▼36.68ms] Passed 4 tests

Server-side resources used by Custom Field Data Icons
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1041.85 ▼3.96
Dashboard /wp-admin3.12 ▼0.2227.36 ▼38.76
Posts /wp-admin/edit.php3.12 ▼0.2328.80 ▼20.50
Add New Post /wp-admin/post-new.php3.12 ▼2.7627.16 ▼74.34
Media Library /wp-admin/upload.php3.12 ▼0.1124.41 ▼13.13
Custom Field Data Icons /wp-admin/options-general.php?page=ecpm_cfd_settings_page3.1224.54

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Custom Field Data Icons
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6214.48 ▲0.092.06 ▲0.2244.54 ▼0.58
Dashboard /wp-admin2,215 ▲274.89 ▼0.02102.18 ▼15.4845.50 ▲0.58
Posts /wp-admin/edit.php2,095 ▲62.00 ▼0.0035.23 ▼3.5336.10 ▲2.90
Add New Post /wp-admin/post-new.php1,533 ▲1423.16 ▲0.08688.76 ▲77.3551.23 ▼22.71
Media Library /wp-admin/upload.php1,397 ▲124.28 ▲0.11102.12 ▼7.4647.95 ▼0.27
Custom Field Data Icons /wp-admin/options-general.php?page=ecpm_cfd_settings_page4,3672.0525.9069.38

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/custom-field-data-icons/ecpm-cfd.php+50
    Use of undefined constant APP_TD - assumed 'APP_TD' (this will throw an Error in a future version of PHP)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=ecpm_cfd_settings_page
    • > Warning in wp-content/plugins/custom-field-data-icons/ecpm-cfd.php+50
    Use of undefined constant APP_TD - assumed 'APP_TD' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=ecpm_cfd_settings_page
    • > Notice in wp-includes/class-wpdb.php+789
    Undefined property: wpdb::$cp_ad_fields
  • 55 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ecpm_cfd_settings_page
    • > Notice in wp-content/plugins/custom-field-data-icons/ecpm-cfd.php+549
    Undefined offset: 0
  • 55 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ecpm_cfd_settings_page
    • > Notice in wp-content/plugins/custom-field-data-icons/ecpm-cfd.php+549
    Undefined offset: 1
  • 55 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ecpm_cfd_settings_page
    • > Notice in wp-content/plugins/custom-field-data-icons/ecpm-cfd.php+549
    Undefined offset: 2
  • 55 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ecpm_cfd_settings_page
    • > Notice in wp-content/plugins/custom-field-data-icons/ecpm-cfd.php+549
    Undefined offset: 3
  • 55 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ecpm_cfd_settings_page
    • > Notice in wp-content/plugins/custom-field-data-icons/ecpm-cfd.php+549
    Undefined offset: 4
  • 55 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ecpm_cfd_settings_page
    • > Notice in wp-content/plugins/custom-field-data-icons/ecpm-cfd.php+549
    Undefined offset: 5
  • 55 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ecpm_cfd_settings_page
    • > Notice in wp-content/plugins/custom-field-data-icons/ecpm-cfd.php+549
    Undefined offset: 6
  • 55 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ecpm_cfd_settings_page
    • > Notice in wp-content/plugins/custom-field-data-icons/ecpm-cfd.php+549
    Undefined offset: 7
  • 55 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ecpm_cfd_settings_page
    • > Notice in wp-content/plugins/custom-field-data-icons/ecpm-cfd.php+549
    Undefined offset: 8
  • 55 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ecpm_cfd_settings_page
    • > Notice in wp-content/plugins/custom-field-data-icons/ecpm-cfd.php+549
    Undefined offset: 9

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
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/custom-field-data-icons/ecpm-cfd.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/custom-field-data-icons/plugin_inc_local.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/custom-field-data-icons/image_sidebar.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Plugin's settings), #2 (How it looks on a live site)
The official readme.txt might help

custom-field-data-icons/ecpm-cfd.php 77% from 13 tests

The entry point to "Custom Field Data Icons" version 1.8.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("custom-field-data-icons.php" instead of "ecpm-cfd.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: Please don't use more than 140 characters for the plugin description (currently 156 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected841 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP49713583
CSS2510165
PO File1323490
JavaScript1003

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
28 compressed PNG files occupy 0.25MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/hide-ads-to-members.png4.42KB4.52KB0.00%
images/remove-detached-images.png3.70KB3.91KB0.00%
images/add-gateway-charges.png3.49KB3.66KB0.00%
images/featured-post-expiration.png10.00KB10.33KB0.00%
images/payment-gateway-icons-feat.png4.77KB4.97KB0.00%