83% tag-tarteaucitron-advanced

Code Review | Tag TarteAuCitron for Polylang

WordPress plugin Tag TarteAuCitron for Polylang scored83%from 54 tests.

About plugin

  • Plugin page: tag-tarteaucitron...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 18, 2021
  • Latest release: Jan 25, 2022
  • Number of updates: 17
  • Update frequency: every 6.5 days
  • Top authors: daeris (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /706 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼8.07ms] Passed 4 tests

An overview of server-side resources used by Tag TarteAuCitron for Polylang
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.50 ▼3.09
Dashboard /wp-admin3.35 ▲0.0143.37 ▼16.23
Posts /wp-admin/edit.php3.47 ▲0.1144.33 ▼3.71
Add New Post /wp-admin/post-new.php5.93 ▲0.0589.09 ▼9.23
Media Library /wp-admin/upload.php3.28 ▲0.0532.18 ▲0.91
Tag TarteAuCitron /wp-admin/options-general.php?page=tarteaucitron-tag-page3.2428.29

Server storage [IO: ▲0.04MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Tag TarteAuCitron for Polylang
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.17 ▼0.111.54 ▼0.0736.82 ▼10.01
Dashboard /wp-admin2,199 ▲225.63 ▼0.0190.99 ▼6.9240.35 ▼6.42
Posts /wp-admin/edit.php2,101 ▼21.99 ▲0.0038.95 ▲4.1234.64 ▼5.04
Add New Post /wp-admin/post-new.php1,538 ▲1018.01 ▼5.17596.48 ▼49.8178.93 ▲25.61
Media Library /wp-admin/upload.php1,404 ▲14.19 ▲0.0195.90 ▼1.8741.90 ▲0.24
Tag TarteAuCitron /wp-admin/options-general.php?page=tarteaucitron-tag-page7902.0023.7827.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/tag-tarteaucitron-advanced/admin/partials/tarteaucitron-tag-admin-display.php:18

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 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:
  • Requires at least: Version not formatted correctly
The official readme.txt might help

tag-tarteaucitron-advanced/tarteaucitron-tag.php 77% from 13 tests

Analyzing the main PHP file in "Tag TarteAuCitron for Polylang" version 1.0.3
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("tag-tarteaucitron-advanced.php" instead of "tarteaucitron-tag.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected224 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP866366224

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.75
▷ Minimum class complexity2.00
▷ Maximum class complexity5.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods1881.82%
▷ Protected methods00.00%
▷ Private methods418.18%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected