81% 12-step-meeting-pdf-generator

Code Review | 12 Step Meeting PDF

WordPress plugin 12 Step Meeting PDF scored 81% from 54 tests.

About plugin

  • Plugin page: 12-step-meeting-p...
  • Plugin version: 0.3.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8.1
  • WordPress version: 5.9.2
  • First release: Mar 9, 2019
  • Latest release: Oct 7, 2021
  • Number of updates: 39
  • Update frequency: every 24.2 days
  • Top authors: cdtoews (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 2,033 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.20MB] [CPU: ▼292.51ms] Passed 4 tests

Server-side resources used by 12 Step Meeting PDF
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1356.08 ▲7.06
Dashboard /wp-admin3.67 ▲0.2633.33 ▼1.96
Posts /wp-admin/edit.php3.89 ▲0.2540.00 ▲2.44
Add New Post /wp-admin/post-new.php7.14 ▲0.1796.44 ▼1,168.28
Media Library /wp-admin/upload.php3.55 ▲0.2525.97 ▼2.24
PDF Generator /wp-admin/edit.php?post_type=tsml_meeting&page=generate_pdf3.3120.23

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 64 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for 12 Step Meeting PDF
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲915.87 ▲0.186.27 ▼0.902.34 ▼0.25
Dashboard /wp-admin2,888 ▲276.10 ▼0.07117.39 ▼20.68150.28 ▼10.97
Posts /wp-admin/edit.php2,688 ▼03.23 ▼0.0160.41 ▼3.47138.05 ▼6.13
Add New Post /wp-admin/post-new.php1,690 ▲2920.53 ▲4.09439.90 ▲14.47158.30 ▲1.96
Media Library /wp-admin/upload.php1,695 ▼35.49 ▼0.02156.58 ▲15.71187.29 ▼7.81
PDF Generator /wp-admin/edit.php?post_type=tsml_meeting&page=generate_pdf280.940.0316.55

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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 fix the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/12-step-meeting-pdf-generator/test.php
    • > /wp-content/plugins/12-step-meeting-pdf-generator/vendor/tecnickcom/tcpdf/tools/tcpdf_addfont.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/12-step-meeting-pdf-generator/12-step-meeting-pdf.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/12-step-meeting-pdf-generator/pdf.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/12-step-meeting-pdf-generator/includes/admin-menu.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'TCPDF' not found in wp-content/plugins/12-step-meeting-pdf-generator/tabletcpdf.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/edit.php?post_type=tsml_meeting&page=generate_pdf
    • > Network (severe)
    wp-admin/edit.php?post_type=tsml_meeting&page=generate_pdf - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (No Screenshots yet) image missing
The official readme.txt might help

12-step-meeting-pdf-generator/12-step-meeting-pdf.php 85% from 13 tests

Analyzing the main PHP file in "12 Step Meeting PDF" version 0.3.1
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("12-step-meeting-pdf-generator.php" instead of "12-step-meeting-pdf.php")

Code Analysis 95% from 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 plugin48,623 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
PHP431,90512,01448,179
HTML110180
JSON300118
JavaScript135783
Markdown121063

PHP code 0% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please tend to the following items
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 4,365)
  • Method cyclomatic complexity should be reduced to less than 100 (currently 502)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity326.30
▷ Minimum class complexity1.00
▷ Maximum class complexity4,365.00
Average method complexity9.82
▷ Minimum method complexity1.00
▷ Maximum method complexity502.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods739
▷ Static methods11215.16%
▷ Public methods46162.38%
▷ Protected methods27637.35%
▷ Private methods20.27%
Functions17
▷ Named functions1482.35%
▷ Anonymous functions317.65%
Constants109
▷ Global constants109100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin