84% cb-portfolio-work

Code Review | CB Portfolio Work For Elementor

WordPress plugin CB Portfolio Work For Elementor scored84%from 54 tests.

About plugin

  • Plugin page: cb-portfolio-work
  • Plugin version: 1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3.1
  • WordPress version: 6.3.1
  • First release: Jul 16, 2022
  • Latest release: Oct 2, 2023
  • Number of updates: 11
  • Update frequency: every 41.3 days
  • Top authors: hmbashar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /587 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
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.47ms] Passed 4 tests

Server-side resources used by CB Portfolio Work For Elementor
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0738.81 ▼1.27
Dashboard /wp-admin3.37 ▲0.0250.60 ▼8.37
Posts /wp-admin/edit.php3.42 ▲0.0646.58 ▲0.04
Add New Post /wp-admin/post-new.php5.95 ▲0.0682.18 ▼12.28
Media Library /wp-admin/upload.php3.29 ▲0.0636.82 ▲1.69
Work Category /wp-admin/edit-tags.php?taxonomy=work_category&post_type=our-works3.2933.77
Add Work /wp-admin/post-new.php?post_type=our-works3.4150.73
Our Works /wp-admin/edit.php?post_type=our-works3.3436.58

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by CB Portfolio Work For Elementor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲10813.23 ▼1.121.71 ▼0.1046.99 ▲7.62
Dashboard /wp-admin2,255 ▲704.87 ▼0.99111.12 ▲7.2743.53 ▲4.59
Posts /wp-admin/edit.php2,137 ▲482.03 ▲0.0434.75 ▼2.3534.93 ▲0.23
Add New Post /wp-admin/post-new.php1,572 ▲5823.24 ▲5.68652.78 ▼13.1064.79 ▲9.38
Media Library /wp-admin/upload.php1,437 ▲494.31 ▲0.14108.34 ▲9.2347.82 ▲2.98
Work Category /wp-admin/edit-tags.php?taxonomy=work_category&post_type=our-works1,3112.3126.8531.71
Add Work /wp-admin/post-new.php?post_type=our-works2,4117.80167.6466.30
Our Works /wp-admin/edit.php?post_type=our-works1,1091.9635.6030.57

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • 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
The smoke test was a success, however most plugin functionality was not tested

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 fix the following items
  • 1× 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/cb-portfolio-work/elementor-addon/includes/widgets/cb-pwork.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: elementor widget, portfolio, portfolios widget, work works

cb-portfolio-work/tools.php 85% from 13 tests

The main PHP script in "CB Portfolio Work For Elementor" version 1.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("cb-portfolio-work.php" instead of "tools.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin466 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5136135377
CSS16689

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity7.50
▷ Minimum class complexity6.00
▷ Maximum class complexity9.00
Average method complexity1.93
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods14
▷ Static methods17.14%
▷ Public methods1285.71%
▷ Protected methods214.29%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.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
There are no PNG files in this plugin