83% laravel-dd

Code Review | Laravel DD for Wordpress

WordPress plugin Laravel DD for Wordpress scored83%from 54 tests.

About plugin

  • Plugin page: laravel-dd
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8
  • WordPress version: 6.3.1
  • First release: Jul 18, 2017
  • Latest release: Mar 3, 2018
  • Number of updates: 4
  • Update frequency: every 57.0 days
  • Top authors: phegman (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /7,267 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼13.39ms] Passed 4 tests

Server-side resources used by Laravel DD for Wordpress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0843.33 ▲3.96
Dashboard /wp-admin3.39 ▲0.0448.40 ▼15.86
Posts /wp-admin/edit.php3.51 ▲0.1547.31 ▼8.44
Add New Post /wp-admin/post-new.php5.97 ▲0.0881.53 ▼29.57
Media Library /wp-admin/upload.php3.32 ▲0.0837.89 ▲0.33

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 80 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Laravel DD for Wordpress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,783 ▲3714.30 ▼0.121.49 ▼0.3544.46 ▲1.04
Dashboard /wp-admin2,195 ▲155.60 ▼0.0693.40 ▲5.2538.44 ▼9.24
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0540.21 ▼2.3335.73 ▼5.82
Add New Post /wp-admin/post-new.php1,542 ▲1023.24 ▼0.20661.89 ▼12.7356.22 ▼1.66
Media Library /wp-admin/upload.php1,394 ▼64.25 ▼0.01100.05 ▼7.9544.10 ▼3.54

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% 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 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 take a closer look at the following
  • 23× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/laravel-dd/vendor/symfony/var-dumper/Tests/CliDumperTest.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/laravel-dd/vendor/symfony/var-dumper/Tests/Caster/SplCasterTest.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/laravel-dd/vendor/symfony/var-dumper/Tests/Caster/ReflectionCasterTest.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/laravel-dd/vendor/symfony/var-dumper/Tests/Caster/ExceptionCasterTest.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\VarDumper\\Cloner\\ClonerInterface' not found in wp-content/plugins/laravel-dd/vendor/symfony/var-dumper/Cloner/AbstractCloner.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/laravel-dd/vendor/symfony/var-dumper/Tests/Test/VarDumperTestTraitTest.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Template' not found in wp-content/plugins/laravel-dd/vendor/symfony/var-dumper/Tests/Fixtures/Twig.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/laravel-dd/vendor/symfony/var-dumper/Tests/Caster/PdoCasterTest.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\VarDumper\\Caster\\CutStub' not found in wp-content/plugins/laravel-dd/vendor/symfony/var-dumper/Caster/CutArrayStub.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\VarDumper\\Cloner\\Stub' not found in wp-content/plugins/laravel-dd/vendor/symfony/var-dumper/Caster/TraceStub.php:21

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 on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === laravel-dd === )
You can take inspiration from this readme.txt

laravel-dd/wp-laravel-dd.php 77% from 13 tests

The principal PHP file in "Laravel DD for Wordpress" v. 1.0.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("laravel-dd.php" instead of "wp-laravel-dd.php")

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
Good job! No executable or dangerous file extensions detected7,983 lines of code in 73 files:
LanguageFilesBlank linesComment linesLines of code
PHP649861,2047,690
JSON400222
Markdown414043
XML13028

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity14.00
▷ Minimum class complexity1.00
▷ Maximum class complexity115.00
Average method complexity3.73
▷ Minimum method complexity1.00
▷ Maximum method complexity69.00
Code structure
Namespaces14
Interfaces3
Traits1
Classes48
▷ Abstract classes24.17%
▷ Concrete classes4695.83%
▷ Final classes12.17%
Methods251
▷ Static methods12248.61%
▷ Public methods21786.45%
▷ Protected methods176.77%
▷ Private methods176.77%
Functions61
▷ Named functions4268.85%
▷ Anonymous functions1931.15%
Constants32
▷ Global constants39.38%
▷ Class constants2990.62%
▷ Public constants29100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected