10% theme-junkie-features-content

Code Review | Theme Junkie Features Content

WordPress plugin Theme Junkie Features Content scored 10% from 54 tests.

About plugin

  • Plugin page: theme-junkie-feat...
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1
  • WordPress version: 6.3.1
  • First release: May 17, 2014
  • Latest release: Oct 26, 2022
  • Number of updates: 7
  • Update frequency: every 440.6 days
  • Top authors: themejunkie (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,004 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'activation' not found or invalid function name

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.87ms] Passed 4 tests

This is a short check of server-side resources used by Theme Junkie Features Content
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0937.33 ▼10.20
Dashboard /wp-admin3.39 ▲0.0945.92 ▼2.78
Posts /wp-admin/edit.php3.50 ▲0.1450.31 ▲5.41
Add New Post /wp-admin/post-new.php5.97 ▲0.0893.82 ▼6.20
Media Library /wp-admin/upload.php3.31 ▲0.0833.98 ▼0.31
Add New /wp-admin/post-new.php?post_type=feature3.4450.69
Features /wp-admin/edit.php?post_type=feature3.3842.98

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Theme Junkie Features Content
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲7313.63 ▼0.571.66 ▼0.3446.15 ▲2.88
Dashboard /wp-admin2,233 ▲504.82 ▼0.1199.66 ▼8.3542.74 ▼2.31
Posts /wp-admin/edit.php2,116 ▲272.01 ▲0.0441.48 ▲4.0535.08 ▲4.68
Add New Post /wp-admin/post-new.php1,557 ▲4323.40 ▼0.01605.33 ▼93.0464.08 ▲4.99
Media Library /wp-admin/upload.php1,415 ▲274.23 ▲0.0795.20 ▼0.1543.85 ▼2.70
Add New /wp-admin/post-new.php?post_type=feature2,2787.59174.6265.63
Features /wp-admin/edit.php?post_type=feature1,2863.4345.5028.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-junkie-features-content/admin/admin.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-junkie-features-content/admin/metabox.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/theme-junkie-features-content/inc/messages.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-junkie-features-content/inc/post-type.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (Features screen), #2 (Meta boxes)
You can take inspiration from this readme.txt

theme-junkie-features-content/tj-features-content.php 92% from 13 tests

The main PHP script in "Theme Junkie Features Content" version 0.1.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("theme-junkie-features-content.php" instead of "tj-features-content.php")

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
There were no executable files found in this plugin340 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP593216203
PO File1323390
JavaScript1141727
CSS13020

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.14
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
2 compressed PNG files occupy 0.02MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png11.70KB11.59KB▼ 0.88%
screenshot-2.png3.97KB3.99KB0.00%