84% orange-front-page

Code Review | Orange Front Page

WordPress plugin Orange Front Page scored84%from 54 tests.

About plugin

  • Plugin page: orange-front-page
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7.3
  • WordPress version: 6.3.1
  • First release: Mar 7, 2017
  • Latest release: Mar 8, 2017
  • Number of updates: 11
  • Update frequency: every 0.4 days
  • Top authors: orangethemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /5,560 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.86MB] [CPU: ▲0.32ms] Passed 4 tests

This is a short check of server-side resources used by Orange Front Page
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.02 ▲0.5542.98 ▲5.73
Dashboard /wp-admin4.35 ▲1.0149.04 ▼10.40
Posts /wp-admin/edit.php4.35 ▲1.0049.44 ▲4.52
Add New Post /wp-admin/post-new.php6.78 ▲0.89101.74 ▲1.43
Media Library /wp-admin/upload.php4.35 ▲1.1340.99 ▲5.72
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins4.5043.48
Orange Front Page Dashboard /wp-admin/themes.php?page=orange-front-page-panel4.5037.74

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 46 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Orange Front Page
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,961 ▲19013.62 ▼0.7611.18 ▲9.2741.91 ▲2.09
Dashboard /wp-admin2,249 ▲665.85 ▲0.72104.30 ▼2.0841.04 ▼0.79
Posts /wp-admin/edit.php2,140 ▲482.09 ▲0.0840.48 ▼1.7539.19 ▲3.48
Add New Post /wp-admin/post-new.php1,575 ▲5618.16 ▼5.01601.25 ▲9.5345.61 ▲2.47
Media Library /wp-admin/upload.php1,442 ▲604.27 ▲0.07101.10 ▼0.1147.19 ▲3.34
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins1,0432.0526.5033.00
Orange Front Page Dashboard /wp-admin/themes.php?page=orange-front-page-panel1,0802.0533.8636.47

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 22× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ot_front_page() in wp-content/plugins/orange-front-page/inc/customizer-sections/about.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/orange-front-page/inc/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ot_front_page() in wp-content/plugins/orange-front-page/sections/counters.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ot_front_page() in wp-content/plugins/orange-front-page/sections/team.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ot_front_page() in wp-content/plugins/orange-front-page/inc/customizer-sections/portfolio.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ot_front_page() in wp-content/plugins/orange-front-page/inc/customizer-sections/counters.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ot_front_page() in wp-content/plugins/orange-front-page/sections/testimonials.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/orange-front-page/inc/custom-controls.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ot_front_page() in wp-content/plugins/orange-front-page/sections/latest-posts.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ot_front_page() in wp-content/plugins/orange-front-page/sections/features.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: one page, front page

orange-front-page/ot_front.php 92% from 13 tests

"Orange Front Page" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("orange-front-page.php" instead of "ot_front.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin9,351 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP291,1592,0104,934
JavaScript71,1224053,168
CSS3204351,247
JSON2002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity32.27
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods173
▷ Static methods126.94%
▷ Public methods14986.13%
▷ Protected methods2413.87%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants350.00%
▷ Class constants350.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/backend/ot-logo.png4.09KB2.62KB▼ 35.89%