61% 12-step-meeting-pdf-generator

Code Review | 12 Step Meeting PDF

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

About plugin

  • Plugin page: 12-step-meeting-p...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3.1
  • WordPress version: 6.3.1
  • First release: Mar 9, 2019
  • Latest release: Aug 30, 2023
  • Number of updates: 47
  • Update frequency: every 34.8 days
  • Top authors: cdtoews (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 5,233 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼1.35ms] Passed 4 tests

An overview of server-side resources used by 12 Step Meeting PDF
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1336.87 ▼8.20
Dashboard /wp-admin3.56 ▲0.2546.17 ▼4.03
Posts /wp-admin/edit.php3.61 ▲0.2552.80 ▲5.32
Add New Post /wp-admin/post-new.php6.14 ▲0.2597.37 ▲4.33
Media Library /wp-admin/upload.php3.48 ▲0.2537.48 ▲2.49
PDF Generator /wp-admin/edit.php?post_type=tsml_meeting&page=generate_pdf3.2125.74

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for 12 Step Meeting PDF
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6813.22 ▼1.171.91 ▼0.4236.35 ▼13.33
Dashboard /wp-admin2,200 ▲125.83 ▲0.92106.02 ▼2.8139.55 ▼2.63
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0339.44 ▼1.6633.69 ▼0.20
Add New Post /wp-admin/post-new.php1,537 ▲423.15 ▼0.04612.70 ▼23.4850.57 ▼5.93
Media Library /wp-admin/upload.php1,391 ▲64.23 ▲0.05103.43 ▲0.1641.71 ▼4.72
PDF Generator /wp-admin/edit.php?post_type=tsml_meeting&page=generate_pdf280.440.073.76

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 83× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/12-step-meeting-pdf-generator/vendor/tecnickcom/tcpdf/examples/example_014.php
    • > /wp-content/plugins/12-step-meeting-pdf-generator/vendor/tecnickcom/tcpdf/examples/example_020.php
    • > /wp-content/plugins/12-step-meeting-pdf-generator/vendor/tecnickcom/tcpdf/examples/barcodes/example_2d_datamatrix_svg.php
    • > /wp-content/plugins/12-step-meeting-pdf-generator/vendor/tecnickcom/tcpdf/examples/example_023.php
    • > /wp-content/plugins/12-step-meeting-pdf-generator/vendor/tecnickcom/tcpdf/examples/example_001.php
    • > /wp-content/plugins/12-step-meeting-pdf-generator/vendor/tecnickcom/tcpdf/tools/tcpdf_addfont.php
    • > /wp-content/plugins/12-step-meeting-pdf-generator/vendor/tecnickcom/tcpdf/examples/example_045.php
    • > /wp-content/plugins/12-step-meeting-pdf-generator/vendor/tecnickcom/tcpdf/examples/example_003.php
    • > /wp-content/plugins/12-step-meeting-pdf-generator/vendor/tecnickcom/tcpdf/examples/barcodes/example_2d_datamatrix_svgi.php
    • > /wp-content/plugins/12-step-meeting-pdf-generator/vendor/tecnickcom/tcpdf/examples/example_054.php
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'TCPDF' not found in wp-content/plugins/12-step-meeting-pdf-generator/tabletcpdf.php:3
    • > 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:17
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/12-step-meeting-pdf-generator/vendor/tecnickcom/tcpdf/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/12-step-meeting-pdf-generator/vendor/tecnickcom/tcpdf/examples/example_066.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bcadd() in wp-content/plugins/12-step-meeting-pdf-generator/vendor/tecnickcom/tcpdf/tcpdf_barcodes_1d.php:2080
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/12-step-meeting-pdf-generator/pdf.php:4
    • > PHP Warning
      require_once(wp-content/plugins/12-step-meeting-pdf-generator/vendor/tecnickcom/tcpdf/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/12-step-meeting-pdf-generator/vendor/tecnickcom/tcpdf/examples/example_066.php on line 22
    • > 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

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors 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 87% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Requires php: Invalid version format
  • Screenshots: Screenshot #1 (No Screenshots yet) image not found
The official readme.txt might help

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

The main file in "12 Step Meeting PDF" v. 1.0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal 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 0% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
These items require your attention
  • For security reasons, never distribute binary or executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/12-step-meeting-pdf-generator/vendor/tecnickcom/tcpdf/examples/data/cert/tcpdf.crt
55,995 lines of code in 254 files:
LanguageFilesBlank linesComment linesLines of code
PHP2464,52018,35953,844
SVG3111,882
JSON300123
JavaScript135783
Markdown121063

PHP code 0% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 4,415)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 500)
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity253.81
▷ Minimum class complexity1.00
▷ Maximum class complexity4,415.00
Average method complexity9.74
▷ Minimum method complexity1.00
▷ Maximum method complexity500.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes26
▷ Abstract classes00.00%
▷ Concrete classes26100.00%
▷ Final classes00.00%
Methods753
▷ Static methods11114.74%
▷ Public methods47362.82%
▷ Protected methods27836.92%
▷ Private methods20.27%
Functions17
▷ Named functions1482.35%
▷ Anonymous functions317.65%
Constants139
▷ Global constants139100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.56MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/tecnickcom/tcpdf/examples/images/alpha.png23.30KB30.34KB0.00%
vendor/tecnickcom/tcpdf/examples/images/tcpdf_cell.png37.47KB36.62KB▼ 2.27%
vendor/tecnickcom/tcpdf/examples/images/tcpdf_signature.png66.18KB25.47KB▼ 61.51%
vendor/tecnickcom/tcpdf/examples/images/image_with_alpha.png238.07KB61.71KB▼ 74.08%
vendor/tecnickcom/tcpdf/examples/images/img.png190.15KB64.69KB▼ 65.98%