78% apple-theme-pack

Code Review | Apple Theme Pack

WordPress plugin Apple Theme Pack scored78%from 54 tests.

About plugin

  • Plugin page: apple-theme-pack
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.6
  • WordPress version: 6.3.1
  • First release: Feb 14, 2017
  • Latest release: Feb 15, 2017
  • Number of updates: 3
  • Update frequency: every 10.7 days
  • Top authors: mikamit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /669 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.25MB] [CPU: ▲7.60ms] Passed 4 tests

This is a short check of server-side resources used by Apple Theme Pack
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.72 ▲1.2544.62 ▲8.64
Dashboard /wp-admin4.54 ▲1.2455.37 ▲11.03
Posts /wp-admin/edit.php4.70 ▲1.3454.06 ▲7.53
Add New Post /wp-admin/post-new.php7.15 ▲1.27102.07 ▲3.19
Media Library /wp-admin/upload.php4.47 ▲1.2447.75 ▲14.35
Add New /wp-admin/post-new.php?post_type=apple_team4.5855.17
Add New /wp-admin/post-new.php?post_type=apple_pricing4.5449.03
Pricing /wp-admin/edit.php?post_type=apple_pricing4.5547.17
Add New /wp-admin/post-new.php?post_type=apple_stat4.5449.89
Features /wp-admin/edit.php?post_type=apple_feature4.5541.63
Team Members /wp-admin/edit.php?post_type=apple_team4.5541.80
Apple Theme Pack /wp-admin/plugins.php?page=apple-theme-pack-welcome-screen4.4442.94
Add New /wp-admin/post-new.php?post_type=apple_client4.5853.08
Add New /wp-admin/post-new.php?post_type=apple_project4.6252.95
Add New /wp-admin/post-new.php?post_type=apple_feature4.6257.76

Server storage [IO: ▲2.49MB] [DB: ▲0.02MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 77 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Apple Theme Pack
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,177 ▲43113.30 ▼1.371.75 ▼0.0032.94 ▼8.75
Dashboard /wp-admin2,547 ▲3554.93 ▼0.01106.88 ▼10.2051.79 ▲11.91
Posts /wp-admin/edit.php2,441 ▲3522.12 ▲0.1139.10 ▲4.0039.04 ▲4.58
Add New Post /wp-admin/post-new.php3,245 ▲1,71223.51 ▲0.16659.43 ▼21.5455.22 ▲0.88
Media Library /wp-admin/upload.php1,743 ▲3554.29 ▲0.14100.90 ▼6.8054.36 ▲6.27
Add New /wp-admin/post-new.php?post_type=apple_team3,5494.2374.9242.20
Add New /wp-admin/post-new.php?post_type=apple_pricing3,4063.2357.9838.72
Pricing /wp-admin/edit.php?post_type=apple_pricing1,4122.0433.9635.76
Add New /wp-admin/post-new.php?post_type=apple_stat3,2642.9860.4841.40
Features /wp-admin/edit.php?post_type=apple_feature1,4122.1036.2433.10
Team Members /wp-admin/edit.php?post_type=apple_team1,4122.0435.1233.95
Apple Theme Pack /wp-admin/plugins.php?page=apple-theme-pack-welcome-screen1,3312.0927.0441.01
Add New /wp-admin/post-new.php?post_type=apple_client3,4124.3370.0338.96
Add New /wp-admin/post-new.php?post_type=apple_project4,0217.79180.4472.04
Add New /wp-admin/post-new.php?post_type=apple_feature4,0317.77172.4064.91

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

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/apple-theme-pack/app/views/admin/welcome/whats-new.php
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function atp_welcome_page_current_tab() in wp-content/plugins/apple-theme-pack/app/views/admin/welcome/nav.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/apple-theme-pack/vendor/tgmpa/class-tgm-plugin-activation.php:1910
    • > PHP Fatal error
      Uncaught Error: Call to undefined function atp_is_apple_theme_active() in wp-content/plugins/apple-theme-pack/app/views/admin/welcome/required-actions.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/apple-theme-pack/app/views/admin/welcome/sidebar.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function atp_welcome_page_current_tab() in wp-content/plugins/apple-theme-pack/app/views/admin/welcome/main.php:65

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
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 undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === apple-theme-pack === )
The official readme.txt is a good inspiration

apple-theme-pack/main.php 92% from 13 tests

The main PHP file in "Apple Theme Pack" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("apple-theme-pack.php" instead of "main.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
Success! There were no dangerous files found in this plugin6,683 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP291,4632,5285,585
SVG100655
CSS5209395
JavaScript49048

PHP code Passed 2 tests

An overview 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.30
Average class complexity24.15
▷ Minimum class complexity1.00
▷ Maximum class complexity178.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes27
▷ Abstract classes00.00%
▷ Concrete classes27100.00%
▷ Final classes00.00%
Methods344
▷ Static methods92.62%
▷ Public methods28683.14%
▷ Protected methods5716.57%
▷ Private methods10.29%
Functions13
▷ Named functions1184.62%
▷ Anonymous functions215.38%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/client5.png3.10KB1.79KB▼ 42.04%
assets/images/client2.png3.14KB1.87KB▼ 40.53%
assets/images/client1.png3.47KB2.12KB▼ 38.83%
assets/images/client3.png3.47KB2.10KB▼ 39.57%
assets/images/client6.png3.48KB1.99KB▼ 42.69%