84% custom-fields-shortcodes

Code Review | Custom Fields Shortcodes

WordPress plugin Custom Fields Shortcodes scored84%from 54 tests.

About plugin

  • Plugin page: custom-fields-sho...
  • Plugin version: 0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.3
  • WordPress version: 6.3.1
  • First release: Dec 28, 2011
  • Latest release: Dec 28, 2011
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: AmirHelzer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /10,203 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.66MB] [CPU: ▼24.11ms] Passed 4 tests

Server-side resources used by Custom Fields Shortcodes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0535.49 ▼6.72
Dashboard /wp-admin3.36 ▲0.0648.74 ▲0.79
Posts /wp-admin/edit.php3.41 ▲0.0550.20 ▲4.03
Add New Post /wp-admin/post-new.php3.09 ▼2.8025.51 ▼94.55
Media Library /wp-admin/upload.php3.29 ▲0.0548.71 ▲14.94

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Fields Shortcodes
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.23 ▼1.351.71 ▼0.2840.44 ▲1.94
Dashboard /wp-admin2,203 ▲185.79 ▲0.6499.67 ▼5.9736.68 ▼7.36
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0140.39 ▲6.4035.35 ▲2.00
Add New Post /wp-admin/post-new.php1,526 ▼1623.31 ▲5.11666.14 ▲41.5860.27 ▲11.42
Media Library /wp-admin/upload.php1,385 ▲34.20 ▼0.01101.04 ▼0.8041.94 ▼4.47

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-fields-shortcodes/includes/visual-editor/editor-addon.class.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/custom-fields-shortcodes/custom-fields-shortcodes.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (Insert custom fields to content)
Please take inspiration from this readme.txt

custom-fields-shortcodes/custom-fields-shortcodes.php Passed 13 tests

Analyzing the main PHP file in "Custom Fields Shortcodes" version 0.9
61 characters long description:
Allows inserting custom fields into content without using PHP

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
Success! There were no dangerous files found in this plugin1,036 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP372117519
JavaScript45244290
CSS24718227

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
2 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/bw_icon16.png0.60KB0.62KB0.00%
screenshot-1.png41.46KB15.79KB▼ 61.92%