71% doctorfeature

Code Review | DoctorFeature

WordPress plugin DoctorFeature scored71%from 54 tests.

About plugin

  • Plugin page: doctorfeature
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8
  • WordPress version: 6.3.1
  • First release: Jul 3, 2017
  • Latest release: Aug 4, 2017
  • Number of updates: 16
  • Update frequency: every 2.1 days
  • Top authors: institutpandore (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /756 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.95MB] [CPU: ▲7.30ms] Passed 4 tests

This is a short check of server-side resources used by DoctorFeature
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1135.96 ▼6.42
Dashboard /wp-admin4.59 ▲1.2966.64 ▲9.42
Posts /wp-admin/edit.php4.64 ▲1.2867.10 ▲16.12
Add New Post /wp-admin/post-new.php7.11 ▲1.22105.92 ▲14.71
Media Library /wp-admin/upload.php4.43 ▲1.1946.07 ▲11.47

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

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

Browser metrics Passed 4 tests

A check of browser resources used by DoctorFeature
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,999 ▲21318.50 ▲4.132.11 ▼0.5742.19 ▼0.59
Dashboard /wp-admin2,374 ▲1949.13 ▲3.53179.46 ▲77.6142.89 ▼0.58
Posts /wp-admin/edit.php2,316 ▲2196.41 ▲4.39118.26 ▲79.6037.20 ▼0.35
Add New Post /wp-admin/post-new.php1,562 ▲3326.12 ▲3.02707.17 ▼0.0533.06 ▼30.46
Media Library /wp-admin/upload.php1,447 ▲476.92 ▲2.67136.73 ▲30.6241.84 ▼5.16
DoctorFeature /wp-admin/crb_carbon_fields_container_doctorfeature.php260.420.0915.25

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/doctorfeature/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
    • > /wp-content/plugins/doctorfeature/vendor/theseconddre/pattern-creator/examples/index.php
  • 102× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Carbon_Fields' not found in wp-content/plugins/doctorfeature/vendor/htmlburger/carbon-fields/config.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Datastore\\Key_Value_Datastore' not found in wp-content/plugins/doctorfeature/vendor/htmlburger/carbon-fields/core/Datastore/Widget_Datastore.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Comparer\\Comparer' not found in wp-content/plugins/doctorfeature/vendor/htmlburger/carbon-fields/core/Container/Condition/Comparer/Scalar_Comparer.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Comparer\\Comparer' not found in wp-content/plugins/doctorfeature/vendor/htmlburger/carbon-fields/core/Container/Condition/Comparer/Contain_Comparer.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/doctorfeature/vendor/htmlburger/carbon-fields/core/Container/Condition/User_Capability_Condition.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GDText\\Tests\\TestCase' not found in wp-content/plugins/doctorfeature/vendor/stil/gd-text/tests/ColorTest.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/doctorfeature/vendor/htmlburger/carbon-fields/core/Field/Html_Field.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Service\\Service' not found in wp-content/plugins/doctorfeature/vendor/htmlburger/carbon-fields/core/Service/REST_API_Service.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/doctorfeature/vendor/htmlburger/carbon-fields/core/Container/Condition/Post_Level_Condition.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon_Fields\\Event\\Listener' not found in wp-content/plugins/doctorfeature/vendor/htmlburger/carbon-fields/core/Event/PersistentListener.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/crb_carbon_fields_container_doctorfeature.php
    • > Network (severe)
    wp-admin/crb_carbon_fields_container_doctorfeature.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Please add descriptions for these screenshots #1, #2 in doctorfeature/assets to your readme.txt
The official readme.txt is a good inspiration

doctorfeature/doctorfeature.php 69% from 13 tests

The entry point to "DoctorFeature" version 1.2.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Domain Path: The domain path should be prefixed with a forward slash character ("/drf")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("drf")
  • Git Repository: A Git repository was detected inside this plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin69,401 lines of code in 317 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript12714,92827,79453,558
PHP1422,2265,8348,254
JSON10305,664
PO File108191,2651,297
CSS24255108482
Markdown3500137
XML1209

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity7.80
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.01
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces26
Interfaces5
Traits0
Classes121
▷ Abstract classes1411.57%
▷ Concrete classes10788.43%
▷ Final classes10.93%
Methods851
▷ Static methods738.58%
▷ Public methods68580.49%
▷ Protected methods15317.98%
▷ Private methods131.53%
Functions77
▷ Named functions1418.18%
▷ Anonymous functions6381.82%
Constants35
▷ Global constants514.29%
▷ Class constants3085.71%
▷ Public constants30100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
15 PNG files occupy 0.18MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/stil/gd-text/tests/images/owl_png8.png3.33KB3.38KB0.00%
vendor/stil/gd-text/tests/images/owl_png24.png6.69KB3.42KB▼ 48.87%
vendor/stil/gd-text/tests/images/test_align_center_right.png10.41KB4.42KB▼ 57.54%
vendor/stil/gd-text/tests/images/test_wrap_NoWrap.png8.77KB4.15KB▼ 52.71%
vendor/stil/gd-text/tests/images/test_align_center_left.png10.39KB4.42KB▼ 57.52%