10% datacake-core

Code Review | Datacake Core

WordPress plugin Datacake Core scored10%from 54 tests.

About plugin

  • Plugin page: datacake-core
  • Plugin version: 1.2.9
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.9.2
  • WordPress version: 6.3.1
  • First release: Jan 18, 2021
  • Latest release: Jul 8, 2022
  • Number of updates: 42
  • Update frequency: every 13.8 days
  • Top authors: datacake (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,495 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > User deprecated in wp-content/plugins/datacake-core/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php+261
    The "Doctrine\Common\Inflector\Inflector::pluralize" method is deprecated and will be dropped in doctrine/inflector 2.0. Please update to the new Inflector API.

Server metrics [RAM: ▲2.45MB] [CPU: ▲11.96ms] Passed 4 tests

Analyzing server-side resources used by Datacake Core
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.88 ▲2.4161.12 ▲20.60
Dashboard /wp-admin5.77 ▲2.4660.40 ▲15.06
Posts /wp-admin/edit.php5.82 ▲2.4658.62 ▲9.95
Add New Post /wp-admin/post-new.php8.37 ▲2.48108.80 ▲2.21
Media Library /wp-admin/upload.php5.69 ▲2.4657.58 ▲24.97
Categorias /wp-admin/edit-tags.php?taxonomy=isp_canais_category&post_type=isp_canais5.6947.96
DK Planos /wp-admin/edit.php?post_type=isp_planos5.7349.92
Tags /wp-admin/edit-tags.php?taxonomy=isp_canais_tag&post_type=isp_canais5.6844.22
Nova Cidade /wp-admin/admin.php?page=isp_city_edit5.5744.17
Adicionar Novo Canal /wp-admin/post-new.php?post_type=isp_canais5.8263.77
Adicionar Novo Plano /wp-admin/post-new.php?post_type=isp_planos6.18111.36
Novo Redirecionamento /wp-admin/admin.php?page=isp_redir_edit6.7449.41
Cidades /wp-admin/admin.php?page=isp_city6.7049.77
Categorias /wp-admin/edit-tags.php?taxonomy=isp_planos_category&post_type=isp_planos5.6946.67
Redirecionamentos /wp-admin/admin.php?page=isp_redir6.7050.82

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 1,706 new files
Database: 3 new tables, 8 new options
New tables
wp_isp_redirect_cities
wp_isp_cities
wp_isp_redirects
New WordPress options
theysaidso_admin_options
datacake-isp-db-version
db_upgraded
widget_theysaidso_widget
widget_lpnet_cidades
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Datacake Core
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,029 ▲28313.60 ▼0.785.98 ▲4.1743.94 ▼1.95
Dashboard /wp-admin2,321 ▲1334.88 ▼0.94106.53 ▲6.7039.54 ▼1.97
Posts /wp-admin/edit.php2,207 ▲1152.03 ▲0.0438.09 ▼3.2033.21 ▼2.55
Add New Post /wp-admin/post-new.php1,615 ▲8223.01 ▼0.09650.66 ▲23.4665.58 ▼9.08
Media Library /wp-admin/upload.php1,500 ▲1124.24 ▲0.0298.88 ▲0.6144.83 ▲3.61
Categorias /wp-admin/edit-tags.php?taxonomy=isp_canais_category&post_type=isp_canais1,3772.1626.5828.18
DK Planos /wp-admin/edit.php?post_type=isp_planos1,1811.9832.0630.43
Tags /wp-admin/edit-tags.php?taxonomy=isp_canais_tag&post_type=isp_canais1,3492.1828.6326.39
Nova Cidade /wp-admin/admin.php?page=isp_city_edit1,0231.8124.6023.56
Adicionar Novo Canal /wp-admin/post-new.php?post_type=isp_canais2,6317.88172.3069.19
Adicionar Novo Plano /wp-admin/post-new.php?post_type=isp_planos2,8668.10196.1370.66
Novo Redirecionamento /wp-admin/admin.php?page=isp_redir_edit9651.7624.6523.78
Cidades /wp-admin/admin.php?page=isp_city1,1941.7124.3332.20
Categorias /wp-admin/edit-tags.php?taxonomy=isp_planos_category&post_type=isp_planos1,3742.2826.8927.08
Redirecionamentos /wp-admin/admin.php?page=isp_redir1,0731.7625.5627.53

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie tables detected upon uninstall: 3 tables
    • wp_isp_cities
    • wp_isp_redirects
    • wp_isp_redirect_cities
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_lpnet_cidades
    • widget_recent-comments
    • datacake-isp-db-version

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=isp_city_edit
    • > Notice in wp-content/plugins/datacake-core/src/Admin/Crud/CityCrud.php+175
    Trying to get property 'is_neighborhood' of non-object
  • 14 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=isp_redir
    • > User deprecated in wp-content/plugins/datacake-core/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php+261
    The "Doctrine\Common\Inflector\Inflector::pluralize" method is deprecated and will be dropped in doctrine/inflector 2.0. Please update to the new Inflector API.

SRP 0% 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
  • 8× PHP files output text when accessed directly:
    • > /wp-content/plugins/datacake-core/src/Pub/partials/datacake_core-public-display.php
    • > /wp-content/plugins/datacake-core/src/Admin/partials/datacake_core-admin-display.php
    • > /wp-content/plugins/datacake-core/vendor/illuminate/pagination/resources/views/semantic-ui.blade.php
    • > /wp-content/plugins/datacake-core/vendor/illuminate/pagination/resources/views/bootstrap-4.blade.php
    • > /wp-content/plugins/datacake-core/vendor/illuminate/pagination/resources/views/simple-default.blade.php
    • > /wp-content/plugins/datacake-core/vendor/symfony/translation/Resources/bin/translation-status.php
    • > /wp-content/plugins/datacake-core/vendor/illuminate/pagination/resources/views/default.blade.php
    • > /wp-content/plugins/datacake-core/vendor/illuminate/pagination/resources/views/simple-bootstrap-4.blade.php
  • 394× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined index: argv in wp-content/plugins/datacake-core/vendor/symfony/translation/Resources/bin/translation-status.php on line 47
    • > PHP Fatal error
      Uncaught Error: Interface 'Illuminate\\Contracts\\Support\\Arrayable' not found in wp-content/plugins/datacake-core/vendor/illuminate/contracts/Support/MessageBag.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Illuminate\\Database\\ConnectionResolverInterface' not found in wp-content/plugins/datacake-core/vendor/illuminate/database/DatabaseManager.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Database\\Events\\MigrationEvent' not found in wp-content/plugins/datacake-core/vendor/illuminate/database/Events/MigrationEnded.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/datacake-core/vendor/guzzlehttp/psr7/src/NoSeekStream.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\Loader\\LoaderInterface' not found in wp-content/plugins/datacake-core/vendor/symfony/translation/Loader/IcuResFileLoader.php:24
    • > PHP Fatal error
      Trait 'Illuminate\\Support\\Traits\\ForwardsCalls' not found in wp-content/plugins/datacake-core/vendor/illuminate/database/Eloquent/Relations/Relation.php on line 17
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon\\Exceptions\\InvalidArgumentException' not found in wp-content/plugins/datacake-core/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodParameterException.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Translation\\Loader\\FileLoader' not found in wp-content/plugins/datacake-core/vendor/symfony/translation/Loader/PhpFileLoader.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Promise\\Promise' not found in wp-content/plugins/datacake-core/vendor/php-http/guzzle6-adapter/src/Promise.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
The official readme.txt is a good inspiration

datacake-core/datacake_core.php 77% from 13 tests

This is the main PHP file of "Datacake Core" version 1.2.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("datacake-core.php" instead of "datacake_core.php")

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Please fix the following items
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/datacake-core/vendor/nesbot/carbon/bin/carbon.bat
99,723 lines of code in 1,461 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,37516,24455,62288,648
Markdown371,69204,654
JSON30003,145
XSD392482,803
JavaScript23815155
Blade51119136
reStructuredText1747874
XML20061
CSS301524
Dockerfile18010
make1409
DOS Batch1004

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
The following items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity9.86
▷ Minimum class complexity1.00
▷ Maximum class complexity293.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces135
Interfaces151
Traits49
Classes502
▷ Abstract classes254.98%
▷ Concrete classes47795.02%
▷ Final classes8016.77%
Methods5,819
▷ Static methods83914.42%
▷ Public methods4,62179.41%
▷ Protected methods93116.00%
▷ Private methods2674.59%
Functions738
▷ Named functions19726.69%
▷ Anonymous functions54173.31%
Constants293
▷ Global constants5017.06%
▷ Class constants24382.94%
▷ Public constants24299.59%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
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
src/Pub/images/icon_internet.png1.95KB1.23KB▼ 36.92%
src/Pub/images/tv-icon.png17.59KB7.78KB▼ 55.77%