78% wpjournal

Code Review | WP Journal

WordPress plugin WP Journal scored78%from 54 tests.

About plugin

  • Plugin page: wpjournal
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2
  • WordPress version: 6.3.1
  • First release: Jun 16, 2015
  • Latest release: Jun 17, 2015
  • Number of updates: 5
  • Update frequency: every 0.8 days
  • Top authors: mediabeta (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

70+ active /5,627 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.60MB] [CPU: ▼14.64ms] Passed 4 tests

Server-side resources used by WP Journal
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1145.80 ▲5.70
Dashboard /wp-admin3.34 ▲0.0343.42 ▼11.30
Posts /wp-admin/edit.php3.53 ▲0.1864.36 ▲11.98
Add New Post /wp-admin/post-new.php3.26 ▼2.6344.90 ▼53.79
Media Library /wp-admin/upload.php3.31 ▲0.0840.61 ▲0.84
Add New /wp-admin/post-new.php?post_type=wpjournal-article3.2439.48
WPJournal /wp-admin/options-general.php?page=WPJournal_template3.3040.20
Add New /wp-admin/post-new.php?post_type=wpjournal3.2440.09
Journals /wp-admin/edit.php?post_type=wpjournal3.3643.84
All Posts /wp-admin/edit.php?post_type=wpjournal-article3.3641.45

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WP Journal
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,072 ▲31115.43 ▲1.278.38 ▲6.4446.33 ▲5.81
Dashboard /wp-admin2,366 ▲1856.59 ▲0.83126.59 ▲13.5440.99 ▲0.23
Posts /wp-admin/edit.php2,305 ▲2053.43 ▲1.4173.29 ▲36.8034.88 ▼3.26
Add New Post /wp-admin/post-new.php1,569 ▲2423.39 ▲0.08630.09 ▼77.7847.69 ▼5.53
Media Library /wp-admin/upload.php1,436 ▲334.62 ▲0.3999.79 ▼20.3642.53 ▼7.44
Add New /wp-admin/post-new.php?post_type=wpjournal-article2,2248.05189.4559.24
WPJournal /wp-admin/options-general.php?page=WPJournal_template1,5703.6247.4994.75
Add New /wp-admin/post-new.php?post_type=wpjournal2,1984.3276.9735.80
Journals /wp-admin/edit.php?post_type=wpjournal1,2993.7060.1630.81
All Posts /wp-admin/edit.php?post_type=wpjournal-article1,2633.6551.0828.54

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wpjournal
    • > Notice in wp-content/plugins/wpjournal/WPJournal_template.php+208
    Trying to get property 'ID' of non-object
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wpjournal
    • > Notice in wp-content/plugins/wpjournal/WPJournal_template.php+208
    Undefined index: authorname
    • > GET request to /wp-admin/post-new.php?post_type=wpjournal-article
    • > Notice in wp-content/plugins/wpjournal/WPJournal_template.php+201
    Trying to access array offset on value of type null
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=wpjournal-article
    • > Notice in wp-content/plugins/wpjournal/WPJournal_template.php+215
    Trying to get property 'post_type' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=WPJournal_template
    • > User deprecated in wp-includes/functions.php+5737
    Function WP_Query was called with an argument that is deprecated since version 3.1.0! caller_get_posts is deprecated. Use ignore_sticky_posts instead.

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 fix the following
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wpjournal/settings.php:64
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wpjournal/templates/plugin-admin-settings-page.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_head() in wp-content/plugins/wpjournal/WPJournal-menabo.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_head() in wp-content/plugins/wpjournal/WPJournal-internalpage.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wpjournal/WPJournal_template.php:55

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: journal, magazine, visual editor, newspaper, publication

wpjournal/WPJournal_template.php 92% from 13 tests

Analyzing the main PHP file in "WP Journal" version 1.1
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("wpjournal.php" instead of "WPJournal_template.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected11,101 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
CSS7262338,156
PHP6562301,465
JavaScript7255721,052
SVG100288
PO File168153140

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity1.50
▷ Minimum class complexity1.00
▷ Maximum class complexity2.00
Average method complexity1.11
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods222.22%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
7 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/WPJournal_placeholder.png4.87KB2.51KB▼ 48.48%
img/WPJournal_WPJournal_logo.png2.70KB1.76KB▼ 34.89%
img/letter.png25.24KB15.15KB▼ 39.98%
img/WPJournal_layout_soon.png5.46KB2.56KB▼ 53.05%
img/WPJournal_layout_1_col.png5.21KB3.03KB▼ 41.91%