84% design-experiments

Code Review | Design Experiments

WordPress plugin Design Experiments scored84%from 54 tests.

About plugin

  • Plugin page: design-experiments
  • Plugin version: 1.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2
  • WordPress version: 6.3.1
  • First release: Jun 14, 2019
  • Latest release: Sep 9, 2019
  • Number of updates: 8
  • Update frequency: every 10.9 days
  • Top authors: kjellr (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /14,783 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.99ms] Passed 4 tests

Analyzing server-side resources used by Design Experiments
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0339.69 ▼0.16
Dashboard /wp-admin3.34 ▼0.0048.59 ▼10.52
Posts /wp-admin/edit.php3.39 ▲0.0450.03 ▼8.24
Add New Post /wp-admin/post-new.php5.92 ▲0.0494.68 ▼9.04
Media Library /wp-admin/upload.php3.27 ▲0.0436.82 ▲3.30
Design Experiments /wp-admin/options-general.php?page=design-experiments3.2334.21

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Design Experiments
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.73 ▼0.581.69 ▼0.0443.99 ▲0.42
Dashboard /wp-admin2,212 ▲244.85 ▼0.02109.95 ▲9.0743.09 ▲4.03
Posts /wp-admin/edit.php2,098 ▲52.04 ▲0.0238.91 ▼5.2335.13 ▼3.05
Add New Post /wp-admin/post-new.php1,534 ▲623.02 ▲4.59587.70 ▼14.9759.47 ▲2.26
Media Library /wp-admin/upload.php1,397 ▲64.13 ▼0.08104.29 ▲7.1747.15 ▲3.88
Design Experiments /wp-admin/options-general.php?page=design-experiments1,0062.1723.6927.37

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

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
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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/design-experiments/index.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% 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: The official readme.txt might help

design-experiments/index.php 92% from 13 tests

This is the main PHP file of "Design Experiments" version 1.3, 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:
  • Main file name: The principal plugin file should be the same as the plugin slug ("design-experiments.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected21,951 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
Sass92,0922911,065
CSS81,83451310,688
PHP14245120
Markdown426062
JSON10012
SVG4004

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods666.67%
▷ Protected methods00.00%
▷ Private methods333.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

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
There are no PNG files in this plugin