89% conditions-for-texts

Code Review | Conditions for Texts (Dynamic Content)

WordPress plugin Conditions for Texts (Dynamic Content) scored89%from 54 tests.

About plugin

  • Plugin page: conditions-for-texts
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.0.2
  • WordPress version: 6.3.1
  • First release: Dec 18, 2018
  • Latest release: Feb 11, 2019
  • Number of updates: 19
  • Update frequency: every 3.1 days
  • Top authors: afnet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /766 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
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.49ms] Passed 4 tests

Analyzing server-side resources used by Conditions for Texts (Dynamic Content)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.37 ▼3.37
Dashboard /wp-admin3.35 ▲0.0043.34 ▼12.88
Posts /wp-admin/edit.php3.40 ▲0.0445.80 ▲0.58
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.89 ▼10.30
Media Library /wp-admin/upload.php3.27 ▲0.0432.53 ▲0.75

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Conditions for Texts (Dynamic Content)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.21 ▼1.405.13 ▲3.5443.35 ▲3.05
Dashboard /wp-admin2,203 ▲185.91 ▲0.05128.33 ▲27.9741.88 ▼2.97
Posts /wp-admin/edit.php2,089 ▼32.00 ▲0.0335.50 ▼8.1730.73 ▼5.91
Add New Post /wp-admin/post-new.php1,534 ▲123.28 ▲4.96661.85 ▲28.2650.88 ▼16.57
Media Library /wp-admin/upload.php1,391 ▲94.27 ▲0.0696.96 ▼5.0240.71 ▼2.81

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

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

Smoke tests Passed 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 Passed 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
No output text or server-side errors detected on direct access of PHP files

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 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: A description for screenshot #1 is required in conditions-for-texts/assets to your readme.txt
  • Tags: Too many tags (39 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

conditions-for-texts/conditions-for-texts.php 92% from 13 tests

This is the main PHP file of "Conditions for Texts (Dynamic Content)" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 187 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin147 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11740147

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.69
Average class complexity63.00
▷ Minimum class complexity63.00
▷ Maximum class complexity63.00
Average method complexity13.40
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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