84% essential-content-types

Code Review | Essential Content Types

WordPress plugin Essential Content Types scored84%from 54 tests.

About plugin

  • Plugin page: essential-content...
  • Plugin version: 2.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.4
  • WordPress version: 6.3.1
  • First release: Apr 20, 2017
  • Latest release: Nov 15, 2023
  • Number of updates: 44
  • Update frequency: every 54.6 days
  • Top authors: catchthemes (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30,000+ active /723,031 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲1.10MB] [CPU: ▲5.40ms] Passed 4 tests

An overview of server-side resources used by Essential Content Types
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.54 ▲1.0845.31 ▲6.37
Dashboard /wp-admin4.42 ▲1.1155.95 ▲8.80
Posts /wp-admin/edit.php4.47 ▲1.1158.21 ▲8.65
Add New Post /wp-admin/post-new.php7.50 ▲1.6196.45 ▼2.23
Media Library /wp-admin/upload.php4.34 ▲1.1043.37 ▲11.70
Menu Item Labels /wp-admin/edit-tags.php?taxonomy=ect_food_menu_item_label&post_type=ect_food_menu_item4.3340.66
Menu Sections /wp-admin/edit-tags.php?taxonomy=ect_food_menu&post_type=ect_food_menu_item4.3342.62
Service Types /wp-admin/edit-tags.php?taxonomy=ect-service-type&post_type=ect-service4.3342.19
Add New /wp-admin/post-new.php?post_type=jetpack-testimonial7.5092.72
Add Many Items /wp-admin/edit.php?post_type=ect_food_menu_item&page=add_many_ect_food_items4.3146.58
All Contents /wp-admin/edit.php?post_type=featured-content4.3949.19
All Testimonials /wp-admin/edit.php?post_type=jetpack-testimonial4.3843.86
Menu Items /wp-admin/edit.php?post_type=ect_food_menu_item4.3943.63
Add New /wp-admin/post-new.php?post_type=ect-service7.50101.79
All Projects /wp-admin/edit.php?post_type=jetpack-portfolio4.3944.72

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 61 new files
Database: no new tables, 11 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
ect_portfolio
ect_featured_content
widget_recent-posts
ect_testimonial
widget_recent-comments
ect_food_menu
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Essential Content Types
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,028 ▲26614.34 ▲0.021.82 ▲0.0937.91 ▼6.83
Dashboard /wp-admin2,393 ▲2135.59 ▲0.0594.18 ▼0.8642.27 ▼6.31
Posts /wp-admin/edit.php2,292 ▲1891.98 ▼0.0240.09 ▼2.1037.82 ▼0.68
Add New Post /wp-admin/post-new.php1,686 ▲15223.15 ▲4.71673.99 ▲14.9254.54 ▼14.21
Media Library /wp-admin/upload.php1,592 ▲1984.09 ▼0.17102.00 ▲2.8143.27 ▼1.14
Menu Item Labels /wp-admin/edit-tags.php?taxonomy=ect_food_menu_item_label&post_type=ect_food_menu_item1,4412.1433.8035.36
Menu Sections /wp-admin/edit-tags.php?taxonomy=ect_food_menu&post_type=ect_food_menu_item1,4662.1428.4731.57
Service Types /wp-admin/edit-tags.php?taxonomy=ect-service-type&post_type=ect-service1,4692.1429.9931.89
Add New /wp-admin/post-new.php?post_type=jetpack-testimonial6,33119.34929.3735.51
Add Many Items /wp-admin/edit.php?post_type=ect_food_menu_item&page=add_many_ect_food_items1,1101.6626.5738.06
All Contents /wp-admin/edit.php?post_type=featured-content1,3281.9332.8631.89
All Testimonials /wp-admin/edit.php?post_type=jetpack-testimonial1,2651.9431.9432.97
Menu Items /wp-admin/edit.php?post_type=ect_food_menu_item1,2672.3636.9830.19
Add New /wp-admin/post-new.php?post_type=ect-service6,38223.22826.7133.90
All Projects /wp-admin/edit.php?post_type=jetpack-portfolio1,3251.9433.5532.40

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 8 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • ect_food_menu
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • ect_service

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/essential-content-types/admin/class-service.php:641
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/essential-content-types/admin/class-food-menu.php:1429
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/essential-content-types/admin/class-testimonial.php:694
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/essential-content-types/admin/class-featured-content.php:685
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_action() in wp-content/plugins/essential-content-types/includes/CatchThemesThemePlugin.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/essential-content-types/admin/partials/footer.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/essential-content-types/admin/partials/dashboard-display.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/essential-content-types/admin/class-portfolio.php:778
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/essential-content-types/admin/partials/sidebar.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/essential-content-types/admin/partials/essential-content-types-admin-display.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% 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:
  • Tags: There are too many tags (16 tag instead of maximum 10)
You can look at the official readme.txt

essential-content-types/essential-content-types.php 92% from 13 tests

The primary PHP file in "Essential Content Types" version 2.2.3 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 286 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin8,015 lines of code in 50 files:
LanguageFilesBlank linesComment linesLines of code
PHP261,1531,6624,832
CSS103511781,763
PO File13984651,113
JavaScript138955307

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity31.20
▷ Minimum class complexity1.00
▷ Maximum class complexity127.00
Average method complexity3.52
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods180
▷ Static methods3418.89%
▷ Public methods17597.22%
▷ Protected methods00.00%
▷ Private methods52.78%
Functions54
▷ Named functions54100.00%
▷ Anonymous functions00.00%
Constants25
▷ Global constants416.00%
▷ Class constants2184.00%
▷ Public constants21100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/premium-plugin-246x116.png9.01KB4.16KB▼ 53.83%
admin/images/free-plugin-246x116.png8.01KB3.81KB▼ 52.42%