84% text-modules

Code Review | Text Modules

WordPress plugin Text Modules scored 84% from 54 tests.

About plugin

  • Plugin page: text-modules
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.3
  • WordPress version: 6.3.1
  • First release: Jul 24, 2015
  • Latest release: Aug 20, 2015
  • Number of updates: 6
  • Update frequency: every 4.5 days
  • Top authors: ipm-frommen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 1,644 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

Analyzing server-side resources used by Text Modules
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.22 ▼5.68
Dashboard /wp-admin3.34 ▲0.0442.56 ▼6.63
Posts /wp-admin/edit.php3.46 ▲0.1045.34 ▲0.84
Add New Post /wp-admin/post-new.php5.92 ▲0.0484.22 ▼5.43
Media Library /wp-admin/upload.php3.26 ▲0.0335.76 ▼0.93
Add New /wp-admin/post-new.php?post_type=text_module3.3847.32
All Text Modules /wp-admin/edit.php?post_type=text_module3.3137.60

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_text-modules
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Text Modules
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲9513.27 ▼1.111.79 ▼0.0544.53 ▼1.55
Dashboard /wp-admin2,233 ▲455.81 ▼0.0794.01 ▼24.3438.29 ▼10.46
Posts /wp-admin/edit.php2,113 ▲272.02 ▲0.0134.35 ▼4.1332.16 ▼2.03
Add New Post /wp-admin/post-new.php1,537 ▲2317.40 ▼0.07641.25 ▼14.4352.99 ▼4.49
Media Library /wp-admin/upload.php1,415 ▲274.22 ▼0.0596.51 ▼2.4641.31 ▼4.25
Add New /wp-admin/post-new.php?post_type=text_module2,1837.72176.7364.23
All Text Modules /wp-admin/edit.php?post_type=text_module1,0731.9330.4826.66

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_text-modules
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/text-modules/inc/Widget.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'tf\\Autoloader\\Rule' not found in wp-content/plugins/text-modules/inc/Autoloader/NamespaceRule.php:10

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

readme.txt 94% 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
Attributes that require attention:
  • Screenshots: These screenshots need descriptions #2, #3 in text-modules/assets to your readme.txt
Please take inspiration from this readme.txt

text-modules/text-modules.php Passed 13 tests

"Text Modules" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
97 characters long description:
Use the new Text Module custom post type and display a text module by either shortcode or widget.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin696 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP21257567603
PO File1286087
CSS2006

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity3.21
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.95
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces5
Interfaces1
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods45
▷ Static methods00.00%
▷ Public methods45100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin