83% thecamels-assistant

Code Review | Thecamels Assistant

WordPress plugin Thecamels Assistant scored83%from 54 tests.

About plugin

  • Plugin page: thecamels-assistant
  • Plugin version: 1.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Apr 7, 2020
  • Latest release: Aug 18, 2021
  • Number of updates: 23
  • Update frequency: every 21.7 days
  • Top authors: paszczak000 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /742 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.59MB] [CPU: ▼3.11ms] Passed 4 tests

This is a short check of server-side resources used by Thecamels Assistant
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.10 ▲0.5943.73 ▼1.32
Dashboard /wp-admin3.93 ▲0.5957.68 ▲3.93
Posts /wp-admin/edit.php3.98 ▲0.5955.83 ▲5.52
Add New Post /wp-admin/post-new.php6.52 ▲0.5992.58 ▼19.30
Media Library /wp-admin/upload.php3.86 ▲0.5942.45 ▲4.27
TC Assistant 23 /wp-admin/index.php?page=tcassistant3.8540.12

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 96 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Thecamels Assistant
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.35 ▼0.001.77 ▲0.0339.85 ▼3.03
Dashboard /wp-admin2,202 ▲285.63 ▲0.0691.59 ▲0.6238.56 ▼2.79
Posts /wp-admin/edit.php2,104 ▲221.94 ▼0.0339.01 ▲3.2537.56 ▼1.21
Add New Post /wp-admin/post-new.php1,533 ▲723.26 ▲0.02662.67 ▲54.2571.24 ▲20.58
Media Library /wp-admin/upload.php1,398 ▲74.18 ▼0.03101.61 ▼3.6642.96 ▼0.35
TC Assistant 23 /wp-admin/index.php?page=tcassistant1,2412.0223.8740.97

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 20× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/thecamels-assistant/vendor/symfony/yaml/Tests/YamlTest.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/thecamels-assistant/the-camels-assistant.php:42
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Yaml\\Exception\\RuntimeException' not found in wp-content/plugins/thecamels-assistant/vendor/symfony/yaml/Exception/ParseException.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Console\\Command\\Command' not found in wp-content/plugins/thecamels-assistant/vendor/symfony/yaml/Command/LintCommand.php:31
    • > PHP Fatal error
      Uncaught Error: Interface 'TheCamels\\Assistant\\Interfaces\\Yamlable' not found in wp-content/plugins/thecamels-assistant/class/Abstracts/YamlLoader.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/thecamels-assistant/inc/views/admin-page.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'TheCamels\\Assistant\\Abstracts\\YamlLoader' not found in wp-content/plugins/thecamels-assistant/class/Core/Checklist.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'TheCamels\\Assistant\\Utils\\Cache\\Cache' not found in wp-content/plugins/thecamels-assistant/class/Utils/Cache/ObjectCache.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/thecamels-assistant/vendor/symfony/yaml/Tests/DumperTest.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/thecamels-assistant/inc/hooks.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: checklist, thecamels, helper, security, todo...

thecamels-assistant/the-camels-assistant.php 77% from 13 tests

The main file in "Thecamels Assistant" v. 1.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • 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
  • Domain Path: The domain path folder was not found ("/languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("thecamels-assistant.php" instead of "the-camels-assistant.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin9,997 lines of code in 89 files:
LanguageFilesBlank linesComment linesLines of code
PHP511,4302,1916,017
YAML31130893,498
JSON100123
JavaScript12953120
Markdown3560118
CSS116094
XML13027

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 112)
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity17.90
▷ Minimum class complexity1.00
▷ Maximum class complexity256.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity112.00
Code structure
Namespaces15
Interfaces3
Traits0
Classes39
▷ Abstract classes12.56%
▷ Concrete classes3897.44%
▷ Final classes25.26%
Methods407
▷ Static methods4110.07%
▷ Public methods35186.24%
▷ Protected methods112.70%
▷ Private methods4511.06%
Functions26
▷ Named functions1869.23%
▷ Anonymous functions830.77%
Constants21
▷ Global constants00.00%
▷ Class constants21100.00%
▷ Public constants21100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin