84% wp-document-automation

Code Review | WordPress Document Automation

WordPress plugin WordPress Document Automation scored84%from 54 tests.

About plugin

  • Plugin page: wp-document-autom...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.2
  • WordPress version: 6.3.1
  • First release: Mar 28, 2019
  • Latest release: May 12, 2019
  • Number of updates: 11
  • Update frequency: every 5.7 days
  • Top authors: wpt00ls (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /838 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼6.93ms] Passed 4 tests

This is a short check of server-side resources used by WordPress Document Automation
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1335.17 ▼7.26
Dashboard /wp-admin3.43 ▲0.0946.79 ▼13.45
Posts /wp-admin/edit.php3.54 ▲0.1945.66 ▲1.52
Add New Post /wp-admin/post-new.php6.01 ▲0.1389.22 ▼6.60
Media Library /wp-admin/upload.php3.35 ▲0.1234.22 ▼0.40

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 92 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WordPress Document Automation
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.22 ▼1.074.65 ▲2.7541.08 ▼4.40
Dashboard /wp-admin2,221 ▲334.83 ▼0.0699.36 ▼11.1238.19 ▼4.60
Posts /wp-admin/edit.php2,104 ▲182.05 ▲0.0440.78 ▲3.4634.73 ▲0.82
Add New Post /wp-admin/post-new.php1,552 ▲2418.47 ▼4.64603.89 ▼26.6652.79 ▼1.12
Media Library /wp-admin/upload.php1,400 ▲124.28 ▲0.0095.88 ▼9.0243.62 ▼1.22

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 fix the following
  • 17× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Pimple\\ServiceProviderInterface' not found in wp-content/plugins/wp-document-automation/vendor/pimple/pimple/src/Pimple/Tests/Fixtures/PimpleServiceProvider.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wp-document-automation/vendor/pimple/pimple/src/Pimple/Tests/Psr11/ServiceLocatorTest.php:39
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/wp-document-automation/vendor/pimple/pimple/src/Pimple/Exception/ExpectedInvokableException.php:36
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerInterface' not found in wp-content/plugins/wp-document-automation/vendor/pimple/pimple/src/Pimple/Psr11/ServiceLocator.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function home_url() in wp-content/plugins/wp-document-automation/views/admin/settings/document-automation.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/wp-document-automation/vendor/pimple/pimple/src/Pimple/Exception/FrozenServiceException.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'Pimple\\Container' not found in wp-content/plugins/wp-document-automation/src/Loader.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerInterface' not found in wp-content/plugins/wp-document-automation/vendor/pimple/pimple/src/Pimple/Psr11/Container.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-document-automation/vendor/pimple/pimple/src/Pimple/Tests/PimpleTest.php:34
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/wp-document-automation/vendor/psr/container/src/NotFoundExceptionInterface.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% 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:
  • Requires php: Version not formatted correctly
The official readme.txt is a good inspiration

wp-document-automation/wp-document-automation.php 92% from 13 tests

The principal PHP file in "WordPress Document Automation" v. 1.0.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected7,536 lines of code in 78 files:
LanguageFilesBlank linesComment linesLines of code
XML6303,838
PHP585031,0502,238
C118847879
JSON500245
C/C++ Header24046132
reStructuredText19413597
m41111141
YAML15035
Markdown322031

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity4.56
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces13
Interfaces4
Traits0
Classes28
▷ Abstract classes00.00%
▷ Concrete classes28100.00%
▷ Final classes27.14%
Methods146
▷ Static methods42.74%
▷ Public methods14397.95%
▷ Protected methods21.37%
▷ Private methods10.68%
Functions61
▷ Named functions11.64%
▷ Anonymous functions6098.36%
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