78% theme-junkie-team-content

Code Review | Theme Junkie Team Content

WordPress plugin Theme Junkie Team Content scored78%from 54 tests.

About plugin

  • Plugin page: theme-junkie-team...
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1
  • WordPress version: 6.3.1
  • First release: Apr 29, 2014
  • Latest release: Oct 26, 2022
  • Number of updates: 11
  • Update frequency: every 282.0 days
  • Top authors: themejunkie (100%)

Code review

54 tests

User reviews

1 review

Install metrics

800+ active /21,132 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼9.15ms] Passed 4 tests

This is a short check of server-side resources used by Theme Junkie Team Content
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1041.27 ▼2.26
Dashboard /wp-admin3.41 ▲0.0650.73 ▼14.85
Posts /wp-admin/edit.php3.52 ▲0.1653.63 ▲7.77
Add New Post /wp-admin/post-new.php5.99 ▲0.1098.16 ▼13.26
Media Library /wp-admin/upload.php3.33 ▲0.1034.42 ▼6.23
Teams /wp-admin/edit.php?post_type=member3.3637.60
Add New /wp-admin/post-new.php?post_type=member3.4651.09

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Theme Junkie Team Content
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.28 ▼0.091.78 ▲0.0341.08 ▼1.54
Dashboard /wp-admin2,222 ▲425.64 ▼0.0492.90 ▼5.4145.18 ▲1.78
Posts /wp-admin/edit.php2,127 ▲271.95 ▼0.0440.35 ▲4.7735.79 ▲1.10
Add New Post /wp-admin/post-new.php1,549 ▲2123.38 ▲0.28635.55 ▼57.4052.33 ▼6.47
Media Library /wp-admin/upload.php1,427 ▲274.19 ▼0.0197.76 ▼18.6545.08 ▼4.52
Teams /wp-admin/edit.php?post_type=member1,3003.2747.6129.02
Add New /wp-admin/post-new.php?post_type=member2,4437.61168.1568.23

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/edit.php?post_type=member
    • > Notice in wp-content/plugins/theme-junkie-team-content/admin/admin.php+67
    Trying to get property 'ID' of non-object

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 5× 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-team-content/inc/functions.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-junkie-team-content/inc/post-type.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-junkie-team-content/admin/metabox.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-junkie-team-content/admin/admin.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/theme-junkie-team-content/inc/messages.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Team screen), #2 (Meta boxes)
The official readme.txt is a good inspiration

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

The main PHP script in "Theme Junkie Team Content" version 0.1.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("theme-junkie-team-content.php" instead of "tj-team-content.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin448 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP6119212283
PO File14647118
JavaScript1141727
CSS13020

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.17
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
2 compressed PNG files occupy 0.04MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png25.66KB24.86KB▼ 3.10%
screenshot-2.png12.92KB13.10KB0.00%