84% custom-content-elementor

Code Review | Custom Content Elementor

WordPress plugin Custom Content Elementor scored84%from 54 tests.

About plugin

  • Plugin page: custom-content-el...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.9
  • WordPress version: 6.3.1
  • First release: Aug 12, 2021
  • Latest release: Feb 14, 2022
  • Number of updates: 5
  • Update frequency: every 37.6 days
  • Top authors: umairsaleem (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /409 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.44ms] Passed 4 tests

An overview of server-side resources used by Custom Content Elementor
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.45 ▲2.78
Dashboard /wp-admin3.36 ▲0.0644.16 ▼4.43
Posts /wp-admin/edit.php3.41 ▲0.0643.05 ▼3.90
Add New Post /wp-admin/post-new.php5.94 ▲0.0681.59 ▼4.19
Media Library /wp-admin/upload.php3.28 ▲0.0536.96 ▲4.59
Add New /wp-admin/post-new.php?post_type=content-elementor3.4147.74
Custom Contents /wp-admin/edit.php?post_type=content-elementor3.3336.85

Server storage [IO: ▲0.02MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Content Elementor
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.37 ▼0.271.71 ▲0.0438.57 ▼9.61
Dashboard /wp-admin2,224 ▲445.59 ▼0.0883.85 ▼3.5880.52 ▲43.52
Posts /wp-admin/edit.php2,123 ▲231.98 ▼0.0434.63 ▼0.9131.85 ▼3.84
Add New Post /wp-admin/post-new.php1,563 ▲3522.85 ▲0.08741.82 ▲76.4155.83 ▼0.24
Media Library /wp-admin/upload.php1,429 ▲354.11 ▼0.1597.15 ▼10.7564.84 ▲18.13
Add New /wp-admin/post-new.php?post_type=content-elementor2,2197.70162.05131.37
Custom Contents /wp-admin/edit.php?post_type=content-elementor1,0941.9332.5928.75

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/custom-content-elementor/widgets/custom-content-widget.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-content-elementor/inc/custom-content-cpt-register.php:4

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 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #3 (screenshot-3.jpg is the vc module setting area.) image required
The official readme.txt might help

custom-content-elementor/custom-content-elementor.php 92% from 13 tests

The main PHP script in "Custom Content Elementor" version 1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 197 characters long)

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
There were no executable files found in this plugin248 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP37148245
CSS1003

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity6.00
▷ Minimum class complexity4.00
▷ Maximum class complexity8.00
Average method complexity1.59
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods17
▷ Static methods15.88%
▷ Public methods1482.35%
▷ Protected methods317.65%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/module-icon.png2.20KB1.13KB▼ 48.56%
assets/images/menuicon.png1.29KB0.67KB▼ 48.30%