56% words-content

Code Review | Word's Content

WordPress plugin Word's Content scored56%from 54 tests.

About plugin

  • Plugin page: words-content
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.1
  • WordPress version: 6.3.1
  • First release: Dec 8, 2017
  • Latest release: Dec 8, 2017
  • Number of updates: 11
  • Update frequency: every 0.1 days
  • Top authors: thekt12 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,201 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▼6.69ms] Passed 4 tests

This is a short check of server-side resources used by Word's Content
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1941.90 ▲1.99
Dashboard /wp-admin3.51 ▲0.2051.04 ▼8.05
Posts /wp-admin/edit.php3.62 ▲0.2648.38 ▼2.35
Add New Post /wp-admin/post-new.php6.11 ▲0.2288.43 ▼18.33
Media Library /wp-admin/upload.php3.43 ▲0.2040.09 ▲2.97
Word's Content /wp-admin/admin.php?page=kt12words-content3.4237.57
Settings /wp-admin/admin.php?page=kt12words-content-settings3.4232.37

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 74 new files
Database: 1 new table, 9 new options
New tables
wp_kt12words_content
New WordPress options
kt12word_footer_content
can_compress_scripts
widget_recent-posts
kt12words_content_table_version
kt12word_highlight_count
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Word's Content
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.17 ▼0.351.81 ▼0.0445.56 ▲0.96
Dashboard /wp-admin2,223 ▲465.62 ▲0.0387.50 ▼5.9140.30 ▼0.44
Posts /wp-admin/edit.php2,125 ▲252.01 ▲0.0739.36 ▲0.1633.31 ▼7.29
Add New Post /wp-admin/post-new.php1,547 ▲1023.74 ▲5.57646.00 ▼41.1650.36 ▼16.25
Media Library /wp-admin/upload.php1,425 ▲224.22 ▲0.0199.52 ▲0.7644.24 ▼0.51
Word's Content /wp-admin/admin.php?page=kt12words-content9983.0359.7126.56
Settings /wp-admin/admin.php?page=kt12words-content-settings1,1642.1438.9687.28

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_kt12words_content
  • Zombie WordPress options detected upon uninstall: 9 options
    • kt12words_content_table_version
    • widget_recent-posts
    • db_upgraded
    • kt12word_highlight_count
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • kt12word_footer_content
    • can_compress_scripts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kt12words-content-settings
    • > Warning in wp-content/plugins/words-content/settings/class-kt12words-content-settings.php+171
    in_array() expects parameter 2 to be array, bool given

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 take a closer look at the following
  • 22× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/words-content/settings/css/index.php
    • > /wp-content/plugins/words-content/settings/index.php
    • > /wp-content/plugins/words-content/admin/index.php
    • > /wp-content/plugins/words-content/includes/index.php
    • > /wp-content/plugins/words-content/public/css/index.php
    • > /wp-content/plugins/words-content/settings/partials/index.php
    • > /wp-content/plugins/words-content/ajax/index.php
    • > /wp-content/plugins/words-content/includes/commons/image/index.php
    • > /wp-content/plugins/words-content/includes/commons/js/index.php
    • > /wp-content/plugins/words-content/ajax/partials/kt12words-content-ajax-display.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/words-content/admin/partials/kt12words-content-admin-form-page-display.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/words-content/settings/partials/kt12words-content-settings-display.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/words-content/admin/partials/kt12words-content-admin-main-page-display.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=kt12words-content
    • > Javascript (severe) in unknown
    /wp-content/plugins/words-content/admin/js/jquery.dataTables.min.js?ver=1.0.0 23:262 Uncaught TypeError: Cannot set properties of undefined (setting '_DT_CellIndex')

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Requires php: The plugin version is formatted incorrectly
Please take inspiration from this readme.txt

words-content/kt12words-content.php 85% from 13 tests

The main file in "Word's Content" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("words-content.php" instead of "kt12words-content.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 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected20,448 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript111,1161,3189,054
CSS91,055577,642
SVG2002,684
PHP171498001,068

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity7.89
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.13
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods55
▷ Static methods00.00%
▷ Public methods4785.45%
▷ Protected methods00.00%
▷ Private methods814.55%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/commons/image/close-red.png6.25KB2.71KB▼ 56.60%
includes/commons/image/plus-red.png4.87KB2.14KB▼ 55.96%
includes/commons/image/plus-blue.png4.81KB2.37KB▼ 50.74%