10% automatic-pages-for-privacy-policy-terms-about-and-contact

Code Review | Automatic pages for Privacy Policy, Terms, About, Contact us

WordPress plugin Automatic pages for Privacy Policy, Terms, About, Contact us scored10%from 54 tests.

About plugin

  • Plugin page: automatic-pages-f...
  • Plugin version: 1.42
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4+
  • WordPress version: 6.3.1
  • First release: Jul 11, 2019
  • Latest release: Jul 30, 2022
  • Number of updates: 44
  • Update frequency: every 25.4 days
  • Top authors: ttodua (65.91%)puvoxsoftware (36.36%)

Code review

54 tests

User reviews

2 reviews

Install metrics

2,000+ active /13,606 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Error in wp-content/plugins/automatic-pages-for-privacy-policy-terms-about-and-contact/library_wp.php+2677
    Uncaught Error: Class 'WP_Plugins_List_Table' not found in wp-content/plugins/automatic-pages-for-privacy-policy-terms-about-and-contact/library_wp.php:2677
    Stack trace:
    #0 wp-content/plugins/automatic-pages-for-privacy-policy-terms-about-and-contact/library_wp.php(2611): Puvox\wp_plugin->is_not_bulk_activation()
    #1 wp-includes/class-wp-hook.php(312): Puvox\wp_plugin->Puvox\{closure}()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/includes/plugin.php(720): do_action()

Server metrics [RAM: ▲2.27MB] [CPU: ▲16.67ms] Passed 4 tests

Analyzing server-side resources used by Automatic pages for Privacy Policy, Terms, About, Contact us
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.81 ▲2.3558.91 ▲20.85
Dashboard /wp-admin5.61 ▲2.3057.97 ▲7.83
Posts /wp-admin/edit.php5.66 ▲2.3067.04 ▲20.41
Add New Post /wp-admin/post-new.php8.13 ▲2.24111.32 ▲17.60
Media Library /wp-admin/upload.php5.47 ▲2.2452.54 ▲22.43
Automatic info pages /wp-admin/options-general.php?page=automatic-text-generator-for-important-pages5.4555.76

Server storage [IO: ▲0.43MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: 1 new table, 7 new options
New tables
wp_automatic_text_generator_for_important_pages__errors_log
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
automatic-text-generator-for-important-pages
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Automatic pages for Privacy Policy, Terms, About, Contact us
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.24 ▼0.401.97 ▲0.2144.35 ▲2.98
Dashboard /wp-admin2,202 ▲215.61 ▲0.0198.61 ▼2.0340.93 ▼1.15
Posts /wp-admin/edit.php2,107 ▲71.97 ▼0.1640.13 ▲1.4235.90 ▼0.10
Add New Post /wp-admin/post-new.php1,535 ▲923.07 ▲0.09597.14 ▼70.2050.50 ▼22.13
Media Library /wp-admin/upload.php1,404 ▲44.21 ▲0.0296.91 ▲1.1643.79 ▼1.50
Automatic info pages /wp-admin/options-general.php?page=automatic-text-generator-for-important-pages1,1812.4952.7781.15

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% 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
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_automatic_text_generator_for_important_pages__errors_log
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • automatic-text-generator-for-important-pages
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/automatic-pages-for-privacy-policy-terms-about-and-contact/default-texts/terms.php
    • > /wp-content/plugins/automatic-pages-for-privacy-policy-terms-about-and-contact/default-texts/contact.php
    • > /wp-content/plugins/automatic-pages-for-privacy-policy-terms-about-and-contact/default-texts/privacy-policy.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Puvox\\library' not found in wp-content/plugins/automatic-pages-for-privacy-policy-terms-about-and-contact/library_wp.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% 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 need to be fixed:
  • Contributors: The plugin contributors field is missing
The official readme.txt is a good inspiration

automatic-pages-for-privacy-policy-terms-about-and-contact/index.php 77% from 13 tests

The main file in "Automatic pages for Privacy Policy, Terms, About, Contact us" v. 1.42 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:
  • Description: Please keep the plugin description shorter than 140 characters (currently 279 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("automatic-pages-for-privacy-policy-terms-about-and-contact.php" instead of "index.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin4,053 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP61,3365,1344,053

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 1,076)
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity354.20
▷ Minimum class complexity21.00
▷ Maximum class complexity1,076.00
Average method complexity2.98
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods865
▷ Static methods10211.79%
▷ Public methods85799.08%
▷ Protected methods00.00%
▷ Private methods80.92%
Functions89
▷ Named functions00.00%
▷ Anonymous functions89100.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.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 images were found in this plugin