88% portfolio-cat-filter-gtb-block

Code Review | Portfolio Cat Filter Gtb Block

WordPress plugin Portfolio Cat Filter Gtb Block scored 88% from 54 tests.

About plugin

  • Plugin page: portfolio-cat-fil...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.7
  • WordPress version: 5.8.1
  • First release: Apr 1, 2021
  • Latest release: Apr 1, 2021
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: hasnatmasum (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 100 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.14MB] [CPU: ▼138.13ms] Passed 4 tests

Analyzing server-side resources used by Portfolio Cat Filter Gtb Block
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.06 ▲1.3440.01 ▲15.78
Dashboard /wp-admin4.33 ▲1.2759.52 ▲14.69
Posts /wp-admin/edit.php4.37 ▲1.2560.81 ▲18.46
Add New Post /wp-admin/post-new.php6.24 ▲0.8074.01 ▼590.52
Media Library /wp-admin/upload.php4.24 ▲1.2438.96 ▲7.54

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 567 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Portfolio Cat Filter Gtb Block
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,141 ▲54521.51 ▲5.9116.30 ▲6.3451.65 ▲4.53
Dashboard /wp-admin3,320 ▲38610.42 ▲4.53214.10 ▲63.10124.10 ▲9.10
Posts /wp-admin/edit.php3,113 ▲3746.79 ▲4.10118.80 ▲46.8792.39 ▼7.07
Add New Post /wp-admin/post-new.php2,128 ▲62622.08 ▲3.28431.66 ▲25.27107.02 ▼11.30
Media Library /wp-admin/upload.php1,962 ▲1527.12 ▲2.12153.16 ▼5.89126.11 ▲0.07

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/portfolio-cat-filter-gtb-block/carbon-fields/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
  • 211× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon_Fields\\Pimple\\ServiceProviderInterface' not found in wp-content/plugins/portfolio-cat-filter-gtb-block/carbon-fields/vendor/htmlburger/carbon-fields/core/Provider/Container_Condition_Provider.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/portfolio-cat-filter-gtb-block/carbon-fields/vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/portfolio-cat-filter-gtb-block/carbon-fields/vendor/htmlburger/carbon-fields/core/Field/Broken_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/portfolio-cat-filter-gtb-block/carbon-fields/vendor/htmlburger/carbon-fields/core/Container/Condition/Term_Level_Condition.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Scripts_Field' not found in wp-content/plugins/portfolio-cat-filter-gtb-block/carbon-fields/vendor/htmlburger/carbon-fields/core/Field/Header_Scripts_Field.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Select_Field' not found in wp-content/plugins/portfolio-cat-filter-gtb-block/carbon-fields/vendor/htmlburger/carbon-fields/core/Field/Gravity_Form_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/portfolio-cat-filter-gtb-block/carbon-fields/vendor/composer/installers/src/Composer/Installers/HuradInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Container' not found in wp-content/plugins/portfolio-cat-filter-gtb-block/carbon-fields/vendor/htmlburger/carbon-fields/core/Container/Comment_Meta_Container.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Service\\Service' not found in wp-content/plugins/portfolio-cat-filter-gtb-block/carbon-fields/vendor/htmlburger/carbon-fields/core/Service/Revisions_Service.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Fulfillable\\Translator\\Translator' not found in wp-content/plugins/portfolio-cat-filter-gtb-block/carbon-fields/vendor/htmlburger/carbon-fields/core/Container/Fulfillable/Translator/Array_Translator.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: education, portfolio, photography, entertainment

portfolio-cat-filter-gtb-block/sara-portfolio-cat-filter.php 85% from 13 tests

The main PHP file in "Portfolio Cat Filter Gtb Block" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("portfolio-cat-filter-gtb-block.php" instead of "sara-portfolio-cat-filter.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin30,108 lines of code in 513 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1745,1958,45812,953
PHP2442,8066,97710,619
PO File268191,0202,202
Sass4833801,765
CSS93451,1521,745
JSON500635
YAML3303118
Markdown426071

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity5.46
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.02
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces24
Interfaces5
Traits0
Classes219
▷ Abstract classes125.48%
▷ Concrete classes20794.52%
▷ Final classes10.48%
Methods986
▷ Static methods919.23%
▷ Public methods77878.90%
▷ Protected methods19920.18%
▷ Private methods90.91%
Functions113
▷ Named functions2623.01%
▷ Anonymous functions8776.99%
Constants34
▷ Global constants720.59%
▷ Class constants2779.41%
▷ Public constants27100.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
No PNG images were found in this plugin