84% premmerce-dev-tools

Code Review | Premmerce Dev Tools

WordPress plugin Premmerce Dev Tools scored 84% from 54 tests.

About plugin

  • Plugin page: premmerce-dev-tools
  • Plugin version: 2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.2
  • WordPress version: 6.3.1
  • First release: Sep 9, 2017
  • Latest release: May 29, 2019
  • Number of updates: 17
  • Update frequency: every 36.9 days
  • Top authors: premmerce (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active / 4,432 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
Installer ran successfully

Server metrics [RAM: ▲0.30MB] [CPU: ▲0.37ms] Passed 4 tests

An overview of server-side resources used by Premmerce Dev Tools
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2638.95 ▲0.50
Dashboard /wp-admin3.66 ▲0.3544.62 ▼0.25
Posts /wp-admin/edit.php3.71 ▲0.3547.15 ▲0.88
Add New Post /wp-admin/post-new.php6.17 ▲0.2995.90 ▲4.25
Media Library /wp-admin/upload.php3.52 ▲0.2934.86 ▲0.33
Plugin generator /wp-admin/admin.php?page=premmerce-dev-toolscreate_plugin3.4932.05
Data generator /wp-admin/admin.php?page=premmerce-dev-toolsgenerate_data3.5032.52
Data cleaner /wp-admin/admin.php?page=premmerce-dev-toolsclean_database3.5031.55

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Premmerce Dev Tools
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9614.84 ▲0.281.72 ▲0.0141.09 ▼2.14
Dashboard /wp-admin2,234 ▲455.77 ▲0.8295.61 ▼16.9040.51 ▲0.57
Posts /wp-admin/edit.php2,120 ▲312.02 ▼0.0040.16 ▲3.6936.92 ▲2.21
Add New Post /wp-admin/post-new.php1,539 ▲617.76 ▼5.18615.00 ▲11.4951.01 ▼7.29
Media Library /wp-admin/upload.php1,419 ▲344.24 ▼0.0199.62 ▲5.0242.36 ▼0.34
Plugin generator /wp-admin/admin.php?page=premmerce-dev-toolscreate_plugin9212.0222.6824.25
Data generator /wp-admin/admin.php?page=premmerce-dev-toolsgenerate_data7852.0223.4222.17
Data cleaner /wp-admin/admin.php?page=premmerce-dev-toolsclean_database1,0062.0522.7329.04

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • 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
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 fix the following items
  • 560× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/premmerce-dev-tools/vendor/fzaninotto/faker/test/Faker/Provider/de_AT/InternetTest.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Address' not found in wp-content/plugins/premmerce-dev-tools/vendor/fzaninotto/faker/src/Faker/Provider/ar_SA/Address.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Color' not found in wp-content/plugins/premmerce-dev-tools/vendor/fzaninotto/faker/src/Faker/Provider/vi_VN/Color.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Company' not found in wp-content/plugins/premmerce-dev-tools/vendor/fzaninotto/faker/src/Faker/Provider/he_IL/Company.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Person' not found in wp-content/plugins/premmerce-dev-tools/vendor/fzaninotto/faker/src/Faker/Provider/hy_AM/Person.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Address' not found in wp-content/plugins/premmerce-dev-tools/vendor/fzaninotto/faker/src/Faker/Provider/nl_NL/Address.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Company' not found in wp-content/plugins/premmerce-dev-tools/vendor/fzaninotto/faker/src/Faker/Provider/ar_SA/Company.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Payment' not found in wp-content/plugins/premmerce-dev-tools/vendor/fzaninotto/faker/src/Faker/Provider/ka_GE/Payment.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Company' not found in wp-content/plugins/premmerce-dev-tools/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Company.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/premmerce-dev-tools/vendor/symfony/stopwatch/Tests/StopwatchTest.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: developers tools, debugging, wordpress debugging, code debug, data cleaner...

premmerce-dev-tools/premmerce-dev-tools.php Passed 13 tests

The entry point to "Premmerce Dev Tools" version 2.0 is a PHP file that has certain tags in its header comment area
104 characters long description:
This plugin is aimed at making it easier to develop, test and debug the code on the WordPress platform.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin107,431 lines of code in 696 files:
LanguageFilesBlank linesComment linesLines of code
PHP66715,39812,033104,590
Markdown1051001,927
JSON700519
PO File299111224
XML570110
YAML310243
JavaScript14010
make1208

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.22
Average class complexity4.19
▷ Minimum class complexity1.00
▷ Maximum class complexity140.00
Average method complexity1.79
▷ Minimum method complexity1.00
▷ Maximum method complexity70.00
Code structure
Namespaces153
Interfaces5
Traits11
Classes632
▷ Abstract classes30.47%
▷ Concrete classes62999.53%
▷ Final classes10.16%
Methods2,290
▷ Static methods79434.67%
▷ Public methods2,12192.62%
▷ Protected methods843.67%
▷ Private methods853.71%
Functions179
▷ Named functions4625.70%
▷ Anonymous functions13374.30%
Constants127
▷ Global constants32.36%
▷ Class constants12497.64%
▷ Public constants124100.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 files were detected