84% project-pages

Code Review | Project Pages

WordPress plugin Project Pages scored84%from 54 tests.

About plugin

  • Plugin page: project-pages
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.0.2
  • WordPress version: 6.3.1
  • First release: Feb 1, 2017
  • Latest release: Jan 2, 2019
  • Number of updates: 9
  • Update frequency: every 77.4 days
  • Top authors: woodyhayday (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /3,494 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.35MB] [CPU: ▲2.73ms] Passed 4 tests

Analyzing server-side resources used by Project Pages
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3539.58 ▲0.23
Dashboard /wp-admin3.70 ▲0.4052.72 ▲4.31
Posts /wp-admin/edit.php3.76 ▲0.3956.99 ▲7.44
Add New Post /wp-admin/post-new.php6.23 ▲0.3497.86 ▲6.62
Media Library /wp-admin/upload.php3.56 ▲0.3336.71 ▼0.24
Add New /wp-admin/post-new.php?post_type=projectpage3.7858.58
Project Tags /wp-admin/edit-tags.php?taxonomy=projectpagetag&post_type=projectpage3.5637.73
All Project Pages /wp-admin/edit.php?post_type=projectpage3.6143.95
Project Pages /wp-admin/options-general.php?page=projectpages-plugin-settings3.5334.41

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Project Pages
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲16013.40 ▼0.957.90 ▲6.0838.58 ▼6.06
Dashboard /wp-admin2,233 ▲595.57 ▼0.1096.77 ▼11.1840.08 ▲0.09
Posts /wp-admin/edit.php2,135 ▲321.96 ▼0.0639.74 ▼3.7336.06 ▼0.82
Add New Post /wp-admin/post-new.php1,555 ▲2723.09 ▲0.06663.84 ▼49.8964.42 ▲0.42
Media Library /wp-admin/upload.php1,432 ▲294.19 ▼0.04111.61 ▲7.8547.39 ▲2.94
Add New /wp-admin/post-new.php?post_type=projectpage3,36411.18236.7195.88
Project Tags /wp-admin/edit-tags.php?taxonomy=projectpagetag&post_type=projectpage1,3062.1227.6231.42
All Project Pages /wp-admin/edit.php?post_type=projectpage1,1142.0335.4528.14
Project Pages /wp-admin/options-general.php?page=projectpages-plugin-settings1,1662.0127.4530.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • can_compress_scripts
    • whppsettings
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to a member function set_404() on null in wp-content/plugins/project-pages/templates/single-projectpage_DEFAULT.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/project-pages/templates/single-projectpage_USETHEMESTYLES.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_archive_title() in wp-content/plugins/project-pages/templates/taxonomy-projectpage_DEFAULT.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function projectPages_get_template_part() in wp-content/plugins/project-pages/templates/projectpages-footer.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_archive_title() in wp-content/plugins/project-pages/templates/archive-projectpage_DEFAULT.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/project-pages/templates/archive-projectpage_USETHEMESTYLES.php:8

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
The official readme.txt might help

project-pages/ProjectPages.php 92% from 13 tests

This is the main PHP file of "Project Pages" version 1.2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("project-pages.php" instead of "ProjectPages.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected5,915 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP111,2005592,694
JavaScript73472491,865
SVG100685
CSS64154443
PO File296128228

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity22.33
▷ Minimum class complexity3.00
▷ Maximum class complexity59.00
Average method complexity3.98
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods43
▷ Static methods00.00%
▷ Public methods43100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions37
▷ Named functions37100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 compressed PNG files occupy 0.03MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/themes/default/assets/images/flags.png27.46KB29.21KB0.00%
i/projectpages.png2.03KB1.59KB▼ 21.79%
i/white-image.png2.78KB2.95KB0.00%