78% pt-theme-addon

Code Review | PT Theme Addon

WordPress plugin PT Theme Addon scored78%from 54 tests.

About plugin

  • Plugin page: pt-theme-addon
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Sep 14, 2017
  • Latest release: Jun 28, 2018
  • Number of updates: 16
  • Update frequency: every 17.9 days
  • Top authors: promenadepro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

2,000+ active /45,240 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
Installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▲0.63ms] Passed 4 tests

This is a short check of server-side resources used by PT Theme Addon
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1648.68 ▲1.66
Dashboard /wp-admin3.46 ▲0.1552.68 ▲5.64
Posts /wp-admin/edit.php3.57 ▲0.2151.81 ▲1.38
Add New Post /wp-admin/post-new.php6.04 ▲0.1688.10 ▼3.79
Media Library /wp-admin/upload.php3.38 ▲0.1539.37 ▲3.26
Add New /wp-admin/post-new.php?post_type=ptta-clients3.4448.28
Categories /wp-admin/edit-tags.php?taxonomy=ptta-portfolio-categories&post_type=ptta-portfolio3.3735.83
Categories /wp-admin/edit-tags.php?taxonomy=ptta-team-categories&post_type=ptta-team3.3737.94
All Items /wp-admin/edit.php?post_type=ptta-portfolio3.4235.97
Add New /wp-admin/post-new.php?post_type=ptta-testimonials3.5046.76
Categories /wp-admin/edit-tags.php?taxonomy=ptta-testimonials-categories&post_type=ptta-testimonials3.3744.55
Add New /wp-admin/post-new.php?post_type=ptta-portfolio3.5057.14
All Items /wp-admin/edit.php?post_type=ptta-team3.4240.73
All Items /wp-admin/edit.php?post_type=ptta-testimonials3.4232.39
Add New /wp-admin/post-new.php?post_type=ptta-team3.4650.50

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, 10 new options
New WordPress options
theysaidso_admin_options
widget_pt-theme-addon-testimonials
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_pt-theme-addon-portfolio
db_upgraded
widget_pt-theme-addon-our-team
widget_pt-theme-addon-clients
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for PT Theme Addon
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,033 ▲27213.39 ▼0.969.87 ▲8.0243.62 ▼2.02
Dashboard /wp-admin2,318 ▲1385.66 ▼0.0485.51 ▼3.8942.17 ▲3.66
Posts /wp-admin/edit.php2,220 ▲1202.03 ▲0.0835.01 ▼5.7336.61 ▼0.02
Add New Post /wp-admin/post-new.php1,627 ▲9923.05 ▼0.20710.88 ▲100.0552.72 ▼1.63
Media Library /wp-admin/upload.php1,520 ▲1204.10 ▼0.08110.68 ▲9.9246.49 ▲0.39
Add New /wp-admin/post-new.php?post_type=ptta-clients1,7673.6165.3634.75
Categories /wp-admin/edit-tags.php?taxonomy=ptta-portfolio-categories&post_type=ptta-portfolio1,3942.1229.8629.15
Categories /wp-admin/edit-tags.php?taxonomy=ptta-team-categories&post_type=ptta-team1,3972.1227.3334.18
All Items /wp-admin/edit.php?post_type=ptta-portfolio1,1981.9131.3031.46
Add New /wp-admin/post-new.php?post_type=ptta-testimonials2,4387.63174.5865.20
Categories /wp-admin/edit-tags.php?taxonomy=ptta-testimonials-categories&post_type=ptta-testimonials1,3912.1226.3531.04
Add New /wp-admin/post-new.php?post_type=ptta-portfolio2,4737.65166.2156.40
All Items /wp-admin/edit.php?post_type=ptta-team1,1921.9630.8433.11
All Items /wp-admin/edit.php?post_type=ptta-testimonials1,1921.9029.3328.42
Add New /wp-admin/post-new.php?post_type=ptta-team1,9683.5564.3133.74

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
Please fix the following items
  • The uninstall procedure has failed, leaving 10 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_pt-theme-addon-clients
    • widget_pt-theme-addon-testimonials
    • widget_recent-posts
    • widget_pt-theme-addon-our-team
    • db_upgraded
    • widget_theysaidso_widget
    • widget_pt-theme-addon-portfolio
    • can_compress_scripts

Smoke tests 50% 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
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=ptta-team-categories&post_type=ptta-team
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

SRP 50% 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
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pt-theme-addon/testimonials/testimonials.php:61
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pt-theme-addon/team/team-widget.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pt-theme-addon/clients/clients.php:61
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pt-theme-addon/team/team.php:61
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pt-theme-addon/testimonials/testimonials-widget.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pt-theme-addon/portfolio/portfolio.php:61
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pt-theme-addon/portfolio/portfolio-widget.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pt-theme-addon/clients/clients-widget.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: custom post type, metaboxes, extension, widget, theme addon...

pt-theme-addon/pt-theme-addon.php 92% from 13 tests

The main PHP script in "PT Theme Addon" version 1.0.4 is automatically included on every request by WordPress
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 221 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected6,950 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
CSS4121322,765
SVG1002,671
PHP105731101,475
JavaScript281139

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity17.80
▷ Minimum class complexity5.00
▷ Maximum class complexity26.00
Average method complexity4.23
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods26
▷ Static methods13.85%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions32
▷ Named functions32100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG files were detected