84% term-pages

Code Review | Term Pages

WordPress plugin Term Pages scored84%from 54 tests.

About plugin

  • Plugin page: term-pages
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Feb 15, 2017
  • Latest release: Jan 22, 2020
  • Number of updates: 8
  • Update frequency: every 135.3 days
  • Top authors: Pixelwelt (87.5%)EdwardBock (25%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,039 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼10.24ms] Passed 4 tests

This is a short check of server-side resources used by Term Pages
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.89 ▼2.44
Dashboard /wp-admin3.38 ▲0.0450.93 ▼14.37
Posts /wp-admin/edit.php3.44 ▲0.0851.06 ▼1.33
Add New Post /wp-admin/post-new.php5.98 ▲0.1092.59 ▼21.31
Media Library /wp-admin/upload.php3.31 ▲0.0836.78 ▼2.83

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Term Pages
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲1014.24 ▲0.071.70 ▼0.2146.29 ▲6.49
Dashboard /wp-admin2,205 ▲255.58 ▼0.1091.94 ▲1.8543.75 ▲2.25
Posts /wp-admin/edit.php2,110 ▲102.02 ▲0.0340.33 ▼3.3837.63 ▼3.98
Add New Post /wp-admin/post-new.php1,533 ▲723.62 ▲0.49677.57 ▼4.0750.41 ▼1.02
Media Library /wp-admin/upload.php1,410 ▲104.21 ▲0.03105.02 ▼8.7046.92 ▼1.02

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 1× 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/term-pages/term-pages.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% 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
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (Admin view for a tag where you can add the relation to a page in the autocomplete field.)
You can take inspiration from this readme.txt

term-pages/term-pages.php Passed 13 tests

The entry point to "Term Pages" version 1.0.3 is a PHP file that has certain tags in its header comment area
51 characters long description:
Overwrites first page of term archives with a page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin199 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP14057114
PO File17838
Markdown119033
JavaScript18014

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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.07MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png75.19KB20.73KB▼ 72.43%